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

[ns] I can not create an object.



Good morning.
I installed ns-allinone-2.1b6 but I had problem with the command 
./configure
Then I installed ns-allinone-2.1b5 and all was OK.
I put also ../ns-allinone-2.1b5/bin into my PATH environment and  
../ns-allinone-2.1b5/otcl-1.0a4 into my LD_LIBRARY_PATH environment.
So I ran ./validate and all the tests were OK.
So I created a new tipe of TBF that I called NTBF.
I saved this new file in ntbf.cc and ntbf.h.
In ntbf.cc I registered my new object wih otcl hierarchy:
	static class NTBFClass : public TclClass {
	public:
		NTBFClass() : TclClass ("NTBF") {}
		TclObject* create(int,const char*const*) {
		return (new NTBF());
	}
	}class_ntbf;
I added ntbf.o in the section OBJ_CC of Makefile.in
I modify also the ../ns-default.tcl with the new parameters.
So I run ./configure and then make from the directory ns-2.1b5 and 
everything
was all right.
I had also the object file ntbf.o in the directory ../ns-2.1b5
But, with surprise, if I call 'new NTBF' I can read :
invalid command name "NTBF" 
	while executing 
"NTBF create _o34 " 
	invoked from within 
"catch "$className create $o $args" msg"
	(procedure "new" line 3) 
	invoked from within 
"new NTBF" 
From another computer, with always ns-allinone-2.1b5 and the same files 
and procedures I had not problem.
But why? Why?

What can I do?

Paolo.