在 Visual C 中使用 boost 1_47快报2010
我已经安装并构建(据我所知是成功的),boost 1_47_0。我现在正在尝试获取示例程序(正则表达式)及其安装指南来运行,它给了我以下链接错误:
LNK2019:无法解析的外部符号“private:class boost :: basic_regex ....
我怀疑问题是这些库是使用 b2 构建为 vc100 的,平台工具集是 Windows7.1SDK,我无法将平台工具集更改为 v100,否则会生成 kernel32.lib 丢失错误。似乎无法弄清楚如何构建 boost,以便它是 sdk7。我正在使用 Visual C++ Express 2010,并且还尝试过从 Windows7.1SDK 命令行提示符构建
。
I have installed and built (successfully as far as I can tell), boost 1_47_0. I am now trying to get the sample program (the regex one) with their install guide to run and it is giving me the following link error:
LNK2019: unresolved external symbol "private: class boost::basic_regex ....
I suspect that the problem is that the libraries were built as vc100 using b2 and the Platform Toolset is Windows7.1SDK. I cannot change the Platform Toolset to v100 or it generates a kernel32.lib missing error. And I cannot seem to figure out how to build boost so that it is sdk7. I am using Visual C++ Express 2010 and have also tried building from the Windows7.1SDK command line prompt.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当我使用“BoostPro Computer”中的安装程序安装 boost 时,我遇到了同样的问题。我通过从源代码编译 boost lib 来解决这个问题。
步骤如下:
完成。
这是我的环境:
I meet the same issue when I install boost with installer from "BoostPro Computing". And I solve it by compiling boost lib from source code.
Here is the steps:
Done.
Here is my environment:
我使用调用 bjam 的批处理文件构建 boost,并且在项目中使用正则表达式库没有遇到任何问题。我使用的是VS2010专业版。以下是我的批处理文件中的几行,额外的库位置对您来说可能并不重要,我只是将它们放在这里是为了完整性:
当然,您的库和 user-config.jam 的路径会有所不同,并且user-config.jam 中只有一行非常重要:
成功构建后,您需要将 stage/lib 目录的路径添加到项目的其他库设置中,以便链接器满意。此外,由于这是一个快速构建,您可能需要修改包含路径才能获取平台 SDK。我从顶级 Boost 目录运行这个批处理文件。
I build boost using a batch file that calls bjam, and I have not had any problems using the regex library in my projects. I am using VS2010 Pro. Here are the lines from my batch file, the extra library locations might not be important to you, I'm just putting them here for completeness:
Of course the path to your libraries and your user-config.jam will be different, and the only one line in user-config.jam that is really important is:
After a successful build you will want to add the path to the stage/lib directory to you additional libraries settings for the project so the linker is satisfied. Also since this is an express build you may have to fiddle with the include path to pick up the platform SDK. I run this batch file from the top level Boost directory.