Which compiler to use with boost thread
Ryan Schmidt
ryandesign at macports.org
Fri Aug 24 15:52:54 PDT 2012
On Aug 24, 2012, at 16:28, Peng Yu wrote:
> I have the above boost installed and I find the following library file
> installed. But I'm not sure which g++ shall be used with these
> libraries. Could anybody let me know how to figure it out? Thanks!
>
> /opt/local/lib/libboost_thread-mt.dylib
> /opt/local/lib/libboost_thread-mt.a
$ otool -L /opt/local/lib/libboost_thread-mt.dylib
/opt/local/lib/libboost_thread-mt.dylib:
/opt/local/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_chrono-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
"/usr/lib/libstdc++.6.dylib" means it was compiled with a system compiler (clang or llvm-gcc-4.2) so you should use one of those when compiling other code using boost.
For comparison, pdftk was compiled with gcc45 as evidenced by "/opt/local/lib/gcc45/libstdc++.6.dylib":
$ otool -L /opt/local/bin/pdftk
/opt/local/bin/pdftk:
/opt/local/lib/gcc45/libgcj.11.dylib (compatibility version 12.0.0, current version 12.0.0)
/opt/local/lib/gcc45/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.14.0)
/opt/local/lib/gcc45/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.7)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1669.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
More information about the macports-users
mailing list