SoonyangZhang / ns3-static-library

link static library in ns3 simualtor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ns3-static-library

Link static libray in ns3 simulator.

The example static lib is foo. Add the library path info Absolute-path-to-LIBDIR in mp3/wscript.
mp3.env.append_value("CXXFLAGS", "-I/Absolute-path-to-LIBDIR/")
mp3.env.append_value("LINKFLAGS", ["-L/Absolute-path-to-LIBDIR/"])

And to make gcc can find the external header file, add the following to /etc/profile

CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/Absolute-path-to-LIBDIR/  
export CPLUS_INCLUDE_PATH  

When building ns3, first input "source /etc/profile".
And there is a blog about this. https://blog.csdn.net/u010643777/article/details/85017577

About

link static library in ns3 simualtor

License:MIT License


Languages

Language:C++ 48.0%Language:Python 32.5%Language:CMake 19.5%