NS-3 (Network Simulator): Some Compile or Syntax Errors

I will post some of the errors I meet in developing NS-3 programs. Some of them are C++ compiler errors, some are not.

Just for records so that I can quickly check for the similar issues.

 

 

  1. If you use any static function in NS-3, i.e. static int val = func(xxx); or include some c codes link md5, you may meet this error on a 64-bit system:
/usr/bin/ld: /tmp/ccQ1dkqh.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

Solution: build code with –enable-static option:

./waf -d optimized configure --enable-static --enable-examples --enable-tests; ./waf build

Leave a comment