[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need help to install ns on Windows95



Hello, folks
 
I am trying to install ns-2.1b5 on windows 95.
 
After I compiled everything(TCL, TK, OTCL, TCLCL and NS), I got ns.exe, but
when I run it with an example tcl script, I got following message, It seems Simulator object even can not be initialized:

        invalid command name "Simulator"
            while executing
        "Simulator create _o1 "
            invoked from within
        "catch "$className create $o $args" msg"
            (procedure "new" line 3)
        invoked from within
        "new Simulator"
        (file "example1b.tcl" line 2)

The example tcl file is:
    #Create a simulator object
    set ns [new Simulator]

    #Open the nam trace file
    set nf [open out.nam w]
    $ns namtrace-all $nf

    #Define a 'finish' procedure
    proc finish {} {
        global ns nf
        $ns flush-trace
         #Close the trace file
        close $nf
        #Execute nam on the trace file
        exec nam out.nam &
        exit 0
    }
    #Create two nodes
            .......

Actually I did some changes to the original source code:
1) since in makefile.vc, original file use source file process.c, but in the
package, I only found ns-process.cc, so I made makefile.vc to use
ns-process.cc instead.
2) in ns-process.cc and propagation.cc, when I compiled these two files,
complier said "return value expected", so I hackily added some "return"
clause. Since all return clause were added behind the "abort()", I guess
these changes dose not hurt anything.
3) I changed
makefile.vc in TCL8.0.4, TK8.0.4, OTCL-1.0a4
makefile.win in  TCLCL-1.0B8 and NS-2.1b5
to adapt to my directory.

I attach two c++ files I changed, changes can be located by
searching with "xshi".
 
Can anyone tell me there is anything wrong with what I did or show me the good way?
 
Thanks in advance.
 
 
Xizheng Shi
---------------------------------------------------
Department of Computer Science
2366 Main Mall
Vancouver B.C. Canada. V6T 1Z4
Tel: (604)-822-0510(0) (604)-264-7276(H)
---------------------------------------------------

ns-process.cc

propagation.cc