使用MSVC 64位增强波形

时间:2012-09-12 12:42:56

标签: boost boost-thread bjam

我需要一些动态链接的构建一些boost库,wave就是其中之一。使用b2.exe命令行工具时,某些库不会构建(其中包括wave)。这就是我用于命令行参数的内容:

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

从输出中我可以推断出线程组件存在问题:

.
...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...

线程似乎与其他符号有关(可能来自日期时间):

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)

首先要寻找解决这些问题的方法是什么?有没有人遇到过类似的问题?

1 个答案:

答案 0 :(得分:1)

当调用bjam(或b2)时,你不需要 - 对于工具集(事实上你不应该拥有它),所以你的命令应该是

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

我拿出了共享和架构选项,因为这些都是默认选项。希望这会有所帮助......