[英]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.