Question

I need a dynamically linkable build of some boost libraries, and wave is one of them. When using the b2.exe command line tool, some libraries won't build (among them is wave). This is what I used for the command line parameters:

C:\boost>b2.exe --toolset=msvc-10.0 --build-type=complete --with-chrono --with-date_time --with-thread --with-wave link=shared architecture=x86 address-model=64

From the output I can deduce there's a problem with the thread component:

.
...removing bin.v2\libs\thread\build\msvc-10.0\debug\address-model-64\architectu
re-x86\threading-multi\boost_thread-vc100-mt-gd-1_50.lib
...removing bin.v2\libs\thread\build\msvc-10.0\debug\address-model-64\architectu
re-x86\threading-multi\boost_thread-vc100-mt-gd-1_50.pdb
...skipped <pbin.v2\libs\wave\build\msvc-10.0\debug\address-model-64\architectur
e-x86\threading-multi>boost_wave-vc100-mt-gd-1_50.dll for lack of <pbin.v2\libs\
thread\build\msvc-10.0\debug\address-model-64\architecture-x86\threading-multi>b
oost_thread-vc100-mt-gd-1_50.lib...

And the thread seems to have a problem with other symbols (perhaps from the date-time):

thread.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) pu
blic: __cdecl boost::gregorian::greg_month::greg_month(unsigned short)" (__imp_?
?0greg_month@gregorian@boost@@QEAA@G@Z) referenced in function "public: __cdecl
boost::gregorian::date::date(enum boost::date_time::special_values)" (??0date@gr
egorian@boost@@QEAA@W4special_values@date_time@2@@Z)
thread.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) pu
blic: __cdecl boost::gregorian::greg_month::operator unsigned short(void)const "
 (__imp_??Bgreg_month@gregorian@boost@@QEBAGXZ) referenced in function "union _L
ARGE_INTEGER __cdecl boost::this_thread::`anonymous namespace'::get_due_time(str
uct boost::detail::timeout const &)" (?get_due_time@?A0x8352ecf9@this_thread@boo
st@@YA?AT_LARGE_INTEGER@@AEBUtimeout@detail@3@@Z)

What's the first place to look for a solution to these problems? Has anybody encountered a similar issue?

Était-ce utile?

La solution

when invoking bjam (or b2) you don't need to have the -- for the toolset (in fact you shouldn't have it), so your command should probably be

b2.exe toolset=msvc-10.0 --build-type=complete --with-chrono --with-date_time --with-thread --with-wave address-model=64

I took out the shared and architecture options, as those were the defaults anyways. Hopefully that'll help...

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top