小编Wes*_*s H的帖子

如何在Windows 10上使用Visual Studio编译Boost

我正在开发一个需要Boost的正则表达式库的新项目。我能够使用no-compile标头,但是需要一些需要编译的二进制文件。Boost的Visual Studio编译文档不是很有帮助(导致多个错误),而且我已经看到相当多的在线人也遇到了同样的问题,但是花了很多时间才能完全解决这些问题,因此我包括以下详细步骤,以帮助遇到相同问题的任何人。

我正在运行Windows 10预览版和Visual Studio 11(2012),但这些步骤也应适用于其他版本。

步骤1-在Visual Studio中设置开发人员命令提示符

您将需要使用它来编译二进制文件。VS命令窗口(Ctrl + W,A)似乎不起作用。

1. In VS , select "Tools" at the top, then select "External Tools" and enter the following:
    -Title: "VS2013 Native Tools-Command Prompt" (your choice)
    -Command: C:\Windows\System32\cmd.exe
    -Arguments: /k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"  (make sure to use the correct path to your version of VS)
    -Initial Directory: Select as suits your needs (if you'll use boost a bunch, I'd select the folder where you dropped boost)
2. Click …
Run Code Online (Sandbox Code Playgroud)

boost visual-studio visual-c++ visual-studio-2012

5
推荐指数
0
解决办法
3469
查看次数