This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Compiling static and shared libraries


> Does 'ldd shared.so' show any dependency on libboost_thread.so?  (I'm
> assuming no)
> 
> Have you tried fixing the link line so that the libraries are listed
> after the objects that depend on them?
> 
> outputdir/shared.so: $(OBJECTS)
>         $(CPP) -o $@ $(OBJECTS) -Wl,--whole-archive outputdir/archive.a
> -Wl,--no-whole-archive -L/path/to/boost -L/path/to/others -
> lboost_python -lboost_thread -lboost_regex -fPIC -shared


No, I had not tried this yet.  Frankly, I'd forgotten about how important it is (this comes from the last 4 or 5 years being in nothing but Windows and using Visual Studio).  I have tried your suggestion above, changing the order, and I can now import the python module without error.  Many thanks Jonathan.

Andy


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]