Visual Studio中没有找到提振包括在释放模式文件(调试工程) [英] Visual Studio not finding boost include files in release mode (works in debug)
问题描述
我使用升压与Visual Studio 2013前preSS。
I'm using boost with Visual Studio 2013 Express.
Visual Studio中找到的#include<升压/ filesystem.hpp方式>
在调试模式下,而不是在释放模式
Visual Studio finds the #include <boost/filesystem.hpp>
in Debug mode, but not in Release mode.
当我尝试在发行模式下编译,它说:
When I try to compile in Release mode, it says:
错误1错误C1083:无法打开包含文件:'升压/ filesystem.hpp':没有这样的文件或目录
当我在的#include
指令右键点击手动打开文件,它工作在调试配置,但同样没有释放,有这样说的:
When I right click on the #include
directive to open the file manually, it works in Debug configuration, but again not in Release, there it says:
文件助推/ filesystem.hpp在当前源文件的目录或在建系统路径没有找到。
我查了构建配置以及
- C / C ++ - >常规 - >附加包含目录
- 链接器 - >常规 - >附加库目录
- 链接器 - >输入 - >附加依赖
对于两个配置是相同的。
Are the same for both configurations.
我是否需要修改构建系统的路径,因为错误说?我认为这就是上述三个选项做。
Do I need to edit the "build system paths", as the error says? I thought that was what the three options above do.
还有什么可能导致这个问题?
What else could cause this problem?
推荐答案
仔细检查你已经检查了实际未建项目的设置。我使用的的boost ::可选的的时候有同样的问题。我只是忽略了另一个项目(单元测试的)是失败的,而不是我怀疑这个项目( CppPlaygroundLib 的),由于misinter $ P $通过集中上线pting生成输出包含错误消息:
Double-check you've checked the settings of the project that actual failed to build. I had the same issue when using boost::optional. I just overlooked that another project (UnitTests) was failing, rather than the project I suspected (CppPlaygroundLib) due to misinterpreting the build output by focussing on the line containing the error message:
1> ------构建启动:项目:单元测试,配置:发行的Win32 ------
1>------ Build started: Project: UnitTests, Configuration: Release Win32 ------
1> FooTests.cpp
1> FooTests.cpp
1> C:\\项目\\操场\\ cppplayground \\ cppplaygroundlib \\ foo.h中(3):致命错误C1083:无法打开包含文件:'升压/可选/ optional.hpp':没有这样的文件或目录
1>c:\projects\playground\cppplayground\cppplaygroundlib\foo.h(3): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
==========生成:0成功,1失败,2个最新,0已跳过==========
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
在我已经添加了缺少升压路径的 C / C ++ - >常规 - >附加包含目录的我的解决方案成功编译
After I had added the missing boost path in C/C++->General->Additional Include Directories my solution compiled successfully.
这篇关于Visual Studio中没有找到提振包括在释放模式文件(调试工程)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!