简体   繁体   中英

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

We have an OpenCL application which uses Nvidia's OpenCL library; it is added to the project's Additional Include Directories property using the NVSKCOMPUTE_ROOT environment variable: $(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); 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...

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM