RE: Compiling static and shared libraries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux