简体   繁体   English

无法构建Boost 64位动态库,只能构建静态

[英]Can't build Boost 64 bit dynamic libraries, only static

I have recently acquired Visual Studio 2010 through Dreamspark, so I can now compile 64 bit applications and libraries. 我最近通过Dreamspark获得了Visual Studio 2010,所以我现在可以编译64位应用程序和库。 I then compiled the Boost 1.47 libraries with Bjam using the following line for input. 然后我用Bjam使用以下行编译Boost 1.47库以进行输入。

.\b2 -a -d 0 -q -j 4 -d 0 --variant=debug,release --link=shared,static --threading=multi --address-model=32 --toolset=msvc-10.0

When I do, I get 4 of each library (static-debug, dynamic-debug, static-release, dynamic-release). 当我这样做时,我得到每个库中的4个(静态调试,动态调试,静态释放,动态释放)。 After they are compiled, I move them into another directory called win32libs. 编译完成后,我将它们移动到另一个名为win32libs的目录中。 I then use the exact same line to compile the 64 bit versions, but switch the address model to 64 (I know they are almost identical because I copy and past from the same text document I made to make compiling them easy). 然后,我使用完全相同的行来编译64位版本,但是将地址模型切换为64(我知道它们几乎完全相同,因为我从我制作的相同文本文档中复制和过去,以便编译它们很容易)。 When I go into my stage directory after the 64 bit compilation, I only see .lib, no .dll. 当我在64位编译后进入我的stage目录时,我只看到.lib,没有.dll。 Is this an issue with what I'm doing, or is in some way, 64 bit dlls not supported? 这是我正在做什么的问题,或者在某种程度上,不支持64位dll?

Thanks 谢谢

The options that change how Boost is compiled (as opposed to those that just control b2's execution) are called "features" and must not be preceeded by dashes on the command line. 更改Boost编译方式的选项(与仅控制b2执行的选项相反)称为“features”,并且不能在命令行上使用破折号。 In your example the features are: 在您的示例中,功能包括:

  • variant 变种
  • link 链接
  • threading 穿线
  • address-model 地址模型
  • toolset 工具集

The libraries it generates will be named according to the library naming scheme for Boost on Windows . 它生成的库将根据Windows上Boost库命名方案命名 lib*.lib are static libraries; lib * .lib是静态库; other*.lib are the import libs for the corresponding DLLs. 其他* .lib是相应DLL的导入库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM