简体   繁体   English

Visual Studio 在调试中编译,发布失败(“无法打开包含文件”)

[英]Visual Studio compiles in Debug, fails Release (“Cannot open include file”)

We have an OpenCL application which uses Nvidia's OpenCL library;我们有一个使用 Nvidia 的 OpenCL 库的 OpenCL 应用程序; it is added to the project's Additional Include Directories property using the NVSKCOMPUTE_ROOT environment variable: $(NVSDKCOMPUTE_ROOT)\OpenCL\common\inc它使用NVSKCOMPUTE_ROOT环境变量添加到项目的Additional Include Directories属性中: $(NVSDKCOMPUTE_ROOT)\OpenCL\common\inc

When I compile the program in Debug mode everything works fine;当我在调试模式下编译程序时一切正常; the program compiles without errors and runs.该程序编译没有错误并运行。

When I compile the program in Release mode I sometimes get the following error:当我在发布模式下编译程序时,有时会出现以下错误:

Error 5 error C1083: Cannot open include file: 'CL/opencl.h': No such file or directory (cl.hpp)

We have already checked the Release Configuration ( Additional Include Directories etc.) and it is identical to Debug (apart from optimization flags);我们已经检查了发布配置( Additional Include Directories等),它与调试相同(除了优化标志); Also, this error only occurs on some systems and it compiles fine on others;此外,此错误仅在某些系统上发生,而在其他系统上编译良好; we are using exactly the same project files (and same run configurations afaik) and can't figure out what's causing the problem...我们正在使用完全相同的项目文件(以及相同的运行配置 afaik)并且无法弄清楚导致问题的原因......

Any ideas or pointers?任何想法或指示?

What are the differences in the systems?系统有什么区别? Does this ever happen with other projects?其他项目是否会发生这种情况? Does this ever happen with other files?其他文件是否会发生这种情况? You say it only occurs on some systems, how often?你说它只发生在某些系统上,多久发生一次?

Could you write another small app using this library and see whether the issue re appears?您能否使用此库编写另一个小应用程序并查看问题是否出现? If so (and your app is not too big) could you gradually build your app up until you see the issue?如果是这样(并且您的应用程序不是太大),您是否可以逐步构建您的应用程序直到发现问题?

暂无
暂无

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

相关问题 无法使用 Visual Studio 打开包含文件 - Cannot open include file with Visual Studio Visual Studio无法打开包含文件;不能打开包含文件。 没有相应的文件和目录 - Visual Studio Cannot open include file; No such file or directory 无法在Visual Studio 2010中打开包含文件'stdlib.h' - Cannot open include file 'stdlib.h' in Visual Studio 2010 Visual Studio在发布模式下找不到boost包含文件(在调试中工作) - Visual Studio not finding boost include files in release mode (works in debug) 无法打开包含文件“Graphics.hpp”没有这样的文件或目录,Visual Studio 的附加包含不起作用 - cannot open include file 'Graphics.hpp' no such file or directory ,additional include for visual studio not working Visual Studio发行版和调试的区别 - Visual Studio Release and Debug difference Visual C ++:无法打开包含文件 - Visual C++: Cannot open include file Visual Studio 2019 x64 上的 FLTK,“无法打开包含文件:'dirent.h':没有这样的文件或目录 - FLTK on Visual Studio 2019 x64, "Cannot open include file: 'dirent.h': No such file or directory Visual Studio 2013迁移:无法打开包含文件:'dxerr8.h':没有此类文件或目录 - Visual studio 2013 Migration : Cannot open include file: 'dxerr8.h': No such file or directory 在CMake(Visual Studio)中设置调试和释放输出文件的位置 - Setting location for Debug and Release output file in CMake(Visual Studio)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM