Results 1 to 2 of 2
I'm trying to get SCons to make a shared library. One of the items going into the .so is a .a static lib. I have a line like: env_2.SharedLibrary('libstuff.so', Split("""stuff.cxx ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-11-2010 #1
- Join Date
- Dec 2006
SCons to make .so with .a
I have a line like:
And upon running get an error:
scons: *** Source file: mylib/libMine.a is static and is not compatible with shared target: libstuff.so
However, I know that a shared library can be made from the .a via command like.
g++ -m32 -shared -o libstuff.so stuff.o mylib/libMine.a
Any ideas on getting this to work are doing the run around the issue would be greatly appreciated.
- 02-12-2010 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
First, all the objects in the static library have to be compiled with the PIC (position indepent code) option. Next, you probably need to extract all the .o files from the archive in order to link them into a shared library.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!