1. 程式人生 > >ns2.335安裝leach-234,編譯器是gcc 4.5,make之後錯誤

ns2.335安裝leach-234,編譯器是gcc 4.5,make之後錯誤

配置ubuntu17.10,ns-2.35,gcc 4.5

安裝leach-234 ------------------------------------------------------------------- 問題一:

照葫蘆畫瓢,修改makefile和makefile.in兩個檔案,如下

CC = gcc-5.4 CPP = g++-5.4 #./configure 出現tcl找不到問題,然後 ./configure --with-tcl-ver=8.5解決! #make clean #
make
make之後出現第一個錯誤! ...... make: g++-5.4:命令未找到
Makefile:96: recipe for target 'tools/random.o' failed
make: *** [tools/random.o] Error 127
--------------------------------------------------------------
問題二:

不修改 makefile和makefile.in兩個檔案,保持兩個檔案原樣不變,
# make clean # make 再次make之後出現第二個錯誤! ...... mac/ll.cc:244:13: error: redefinition of ‘void LL::hdr_dst(Packet*, int)’
 inline void LL::hdr_dst(Packet *, int)
             ^
In file included from ./mac/mac.h:47:0,
                 from mac/ll.cc:43:
./mac/ll.h:99:22: note: ‘virtual void LL::hdr_dst(Packet*, int)’ previously defined here
  inline virtual void hdr_dst(Packet *p, int macDA) {}
                      ^
Makefile:96: recipe for target 'mac/ll.o' failed
make: *** [mac/ll.o] Error 1