LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   compilation problem (https://www.linuxquestions.org/questions/linux-newbie-8/compilation-problem-672719/)

rania kamal 09-27-2008 08:10 AM

compilation problem
 
hi all,
i install ns2.33 on my ubuntu and i have to do some changes in ns2.33 (replace some .cc & .h files and and delete packet.o file) to be able to simulate GPSR protocol, so i must compile ns2.33 to reflect my changes but appear to me problems:-

rania@rania-desktop:~/ns-allinone-2.33/ns-2.33$ make
make: CXX@: Command not found
make: *** [common/packet.o] Error 127
rania@rania-desktop:~/ns-allinone-2.33/ns-2.33$


i have already install in usr/bin g++,g++-4.1,gcc,gcc-4.1
i install also build essential
i posts this problem to many groups but i haven't get the answer, hope u can help me,if u need any informations plz inform me, thanks

brianL 09-28-2008 05:40 PM

Put ./ before make:
Code:

rania@rania-desktop:~/ns-allinone-2.33/ns-2.33$ ./make

jay73 09-28-2008 05:46 PM

does the thing actually have a makefile in that directory?

brianL 09-28-2008 06:18 PM

Quote:

Originally Posted by jay73 (Post 3294452)
does the thing actually have a makefile in that directory?

Mmm, why didn't I think of that?
There should be a README and INSTALL files, too.
Might have to ./configure.

rania kamal 10-08-2008 01:06 PM

Quote:

Originally Posted by brianL (Post 3294480)
Mmm, why didn't I think of that?
There should be a README and INSTALL files, too.
Might have to ./configure.

i run configure then make and the got the same thing. but when i run ./configure instead of ./configure i got alot of error, the following is the part of code:(

No .configure file found in current directory
Continuing with default options...
checking build system type... i686-pc-linux-gnu
.
checking whether we are cross compiling... no
.
checking that g++ can handle -O2... no
checking if C++ libraries work without any namespace... no
checking if C++ libraries work with namespace std... yes
.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tcl/lib/ns-autoconf.tcl
config.status: creating indep-utils/webtrace-conv/ucb/Makefile
config.status: creating indep-utils/webtrace-conv/dec/Makefile
config.status: creating indep-utils/webtrace-conv/nlanr/Makefile
config.status: creating indep-utils/webtrace-conv/epa/Makefile
config.status: creating indep-utils/cmu-scen-gen/setdest/Makefile
config.status: creating autoconf.h
config.status: autoconf.h is unchanged

and when i type make:(

common/packet.cc:44: error: conflicting declaration 'char** p_info::name_'
common/packet.h:277: error: 'p_info::name_' has a previous declaration as 'char* p_info::name_ [59]'
common/packet.cc:44: error: declaration of 'char* p_info::name_ [59]' outside of class is not definition
common/packet.cc:45: error: 'unsigned int p_info::nPkt_' is not a static member of 'class p_info'
common/packet.cc:46: error: expected constructor, destructor, or type conversion before '*' token
common/packet.cc:48: error: no 'int p_info::addPacket(char*)' member function declared in class 'p_info'
common/packet.cc: In member function 'int p_info::addPacket(char*)':
common/packet.cc:50: error: 'nPkt_' was not declared in this scope
common/packet.cc:51: error: 'initName' was not declared in this scope
common/packet.cc:53: error: 'nPkt_' was not declared in this scope
common/packet.cc:55: error: 'initName' was not declared in this scope
make: *** [common/packet.o] Error 1


All times are GMT -5. The time now is 05:35 PM.