[cctbxbb] Using iotbx.pdb as C++ only dynamic (shared) library

vanv0059 at umn.edu vanv0059 at umn.edu
Fri Dec 9 13:52:56 PST 2011


On Dec 9 2011, Ralf Grosse-Kunstleve wrote:

>Hi Jeff,
>
>Did you copy all the -DXXX that you see on the compilation line for the
>iotbx/pb files? In particular, the -DBOOST_DISABLE_THREADS is probably
>critical, but highly I recommend you copy all -DXXX. Otherwise you'll most
>likely violate the C++ One Definition Rule (ODR) which could explain your
>crash.

Ok, I will look at the define. I am sure I didn't copy them all (I 
overlooked the fact that they might be required for linking).

>Did you try to link against lib/libiotbx_pdb.a instead of the .o files? (On
>the Mac I couldn't figure out how to link dynamically loaded Python
>extensions against shared libraries, but it is probably 7+ years ago that I
>tried the last time.)

I had forgotten about the lib/libiotbx_pdb.a. Yes, this one works. Of 
course, the linker gives me warning about non portability as I tried to 
include it in a .dylib. I don't recall if I tried to use such a library or 
no.

I will reply once I follow up on these items.

Thanks,

Jeff Van Voorst


More information about the cctbxbb mailing list