[Scons-users] How to build a relocatable object file with Scons?
yingshen.yu at gmail.com
Wed Jan 31 05:53:32 EST 2018
How can I build a relocatable object file with scons?
I have two source files: a.cpp and b.cpp, here are the manual ways to build
them into a relocatable object file.
g++ -c -fPIC -fvisibility=hidden a.cpp -o a.o
g++ -c -fPIC -fvisibility=hidden b.cpp -o a.o
ld -r a.o b.o -o final.o
I tried StaticLibrary, but it rans ar instead of ld,
I tried SharedLibrary, but it generates a shared library. (.dylib) on my
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scons-users