LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is there any restriction in compiling the c++ files in ns2 library? (https://www.linuxquestions.org/questions/linux-newbie-8/is-there-any-restriction-in-compiling-the-c-files-in-ns2-library-690046/)

shyan 12-12-2008 05:08 AM

Is there any restriction in compiling the c++ files in ns2 library?
 
I got the following errors while executing the dsdv.cc that was installed with the simulator. I have tried by setting paths that did not work too. But these errors are in the standard files provided by the simulator so I am little bit confused whether we are able to compile any new c++ file or not, since it is not compiling the existing c++ file which has been already compiled for the object code generation.


[Shyan@localhost dsdv]$ c++ dsdv.cc
/usr/src/ns-allinone-2.33/tclcl-1.19/tclcl-mappings.h: In static member function ‘static int TclObjectHelper<T>::dispatch_(void*, Tcl_Interp*, int, char**)’:

/usr/src/ns-allinone-2.33/tclcl-1.19/tclcl-mappings.h:50: error: expected unqualified-id before ‘=’ token

/usr/src/ns-allinone-2.33/tclcl-1.19/tclcl-mappings.h:50: error: abstract declarator ‘Tcl&’ used as declaration

/usr/src/ns-allinone-2.33/tclcl-1.19/tclcl-mappings.h:51: error: expected primary-expression before ‘*’ token

/usr/src/ns-allinone-2.33/tclcl-1.19/tclcl-mappings.h:51: error: expected primary-expression before ‘)’ token

/usr/src/ns-allinone-2.33/tclcl-1.19/tclcl-mappings.h:56: error: expected primary-expression before ‘.’ token

/usr/src/ns-allinone-2.33/ns-2.33/common/packet.h: At global scope:

/usr/src/ns-allinone-2.33/ns-2.33/common/packet.h:582: error: expected identifier before numeric constant

/usr/src/ns-allinone-2.33/ns-2.33/common/packet.h:582: error: expected `}' before numeric constant

/usr/src/ns-allinone-2.33/ns-2.33/common/packet.h:582: error: expected unqualified-id before numeric constant

/usr/src/ns-allinone-2.33/ns-2.33/common/packet.h:591: error: ‘dir_t’ does not name a type

/usr/src/ns-allinone-2.33/ns-2.33/common/packet.h:640: error: expected initializer before ‘&’ token

/usr/src/ns-allinone-2.33/ns-2.33/common/packet.h:650: error: expected declaration before ‘}’ token

knudfl 12-12-2008 06:00 AM

'cd ns-allinone-2.33/ns-2.33/' .. './configure' .. 'make'
will compile the missing things in 2 minutes, dsdv as the last one.

Never thought of it before, I am using a different setup =
ns-2.33 + nam-1.13 , installed to /usr/local , then no new
LD_LIBRARY_PATH has to be made.


Good Luck !


All times are GMT -5. The time now is 06:30 AM.