
Hi all.
I've built a static library that references boost threads, conditions and
ptime. All the libraries were build with the following command "bjam
--layout=system link=static release debug", then renamed to something more
generic eg. boost_thread-mt.lib for the multi-threaded release version of
the thread library. Now I know I did get the static libraries and not the
DLL bridges because it was originally named libboost_thread-mt.lib.
Actually I also used the --buildid command to add something other than
-1_35, but I don't think that really matters. Anyway, the Win32 version of
my project is built using VS2008, so I have a top level include file that
defines BOOST_ALL_NO_LIB to prevent auto-linking. I then explicitly link
the libraries that I need and build my project library. I assume it's
actually linking everything in successfully since the output lib is vastly
larger when I link the libs than when I don't.
Now the real problem comes when I try to link to this library in my test
application. I've switched up whether it is the lib or the application that
defines BOOST_ALL_NO_LIB, and who actually links to the libraries etc. I've
also made sure that they're all using the same run-time build settings eg.
/MTd for both my lib and app, which would link to the -mt-gd version of the
boost libraries. No matter what I do, I get a bunch of warnings about using
locally defined symbols (changing which one links the libraries just changes
whether the warning originates from my lib or boost's) and a few unresolved
externals. They look something like this:
Common.lib(thread.obj) : warning LNK4217: locally defined symbol
??0id@locale@std@@QAE@I@Z (public: __thiscall std::locale::id::id(unsigned
int)) imported in function "void __cdecl `dynamic initializer for 'public:
static class std::locale::id boost::date_time::date_facet