Microsoft Visual Studio 2008:devenv.exe 忽略 /useenv 选项
在 Microsoft Visual Studio 2008 中,我想从命令行为解决方案 (*.sln) 设置 C++ 目录(包含、库等)。在 Visual Studio 2003 之前,我已经成功地依赖于 devenv.exe 的 /useenv 选项,从命令行启动。这似乎不适用于 Visual Studio 2008 专业版。由环境变量 INCLUDE 和 LIB 设置的目录将被忽略。
我找到的有关此问题的唯一参考是 此处。它在以下位置提到了“外部依赖项”部分:工具 ->选项->项目与解决方案-> VC++ 目录。我找不到这样的部分。我发现我认为是“外部依赖项”(我不确定,因为我正在运行翻译成意大利语的 VS2008)部分:右键单击解决方案!特性 !共享财产? !外部依赖项?,但该部分是空的。
我正在运行 Microsoft Visual Studio 2008 版本 9.0.21022.8 RTM,这里的批处理
set INCLUDE=C:\Programmi\Microsoft Platform SDK February 2003\Include;C:\Programmi\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\INCLUDE
start "devenv.exe" "mySolution.sln" /useenv
“BuildLog.htm”显示了以下内容:
INCLUDE=C:\boost_1_44_0;C:\Programmi\Microsoft Visual Studio 2008 Professional\VC\include;C:\Programmi\Microsoft Visual Studio 2008 Professional\VC\atlmfc\include
有帮助吗?谢谢。
in Microsoft Visual Studio 2008, I want to set C++ directories (includes, libraries, etc.) for a solution (*.sln) from command line. Until Visual Studio 2003, I've successfully relied upon /useenv option of devenv.exe, started from command line. This does not seem to work on Visual Studio 2008 Professional Edition. Directories set by environment variables INCLUDE and LIB are being ignored.
Only reference I've found for this issue is here. It mentions an "External Dependencies" section in: Tools -> Options -> Projects & Solutions -> VC++ Directories. I cannot find such section. I've found what I think is an "External Dependencies" (I'm not sure because I'm running a VS2008 translated to Italian) section in: right click on solution ! Properties ! Shared Properties? ! External Dependencies?, but such section is empty.
I'm running Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM and here's the batch
set INCLUDE=C:\Programmi\Microsoft Platform SDK February 2003\Include;C:\Programmi\Microsoft Visual Studio .NET 2003\VC7\ATLMFC\INCLUDE
start "devenv.exe" "mySolution.sln" /useenv
"BuildLog.htm" shows this instead:
INCLUDE=C:\boost_1_44_0;C:\Programmi\Microsoft Visual Studio 2008 Professional\VC\include;C:\Programmi\Microsoft Visual Studio 2008 Professional\VC\atlmfc\include
Any help? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以向您保证 /useenv 开关仍然有效。我仍然可以从命令行构建所有解决方案,一直到 VS2010,无论有没有 STLport(我首先覆盖 INCLUDE 和 LIB 路径的主要原因)。
我的构建脚本可以在这里找到 - http://www.cix.co.uk /~gort/win32.htm#scripts
I can assure you that the /useenv switch does still work. I can still build all my solutions from the command line, right up to VS2010, with and without STLport (my main reason for overriding the INCLUDE and LIB paths in the first place).
My builds scripts are available here - http://www.cix.co.uk/~gort/win32.htm#scripts