New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSB8066 Error #17
Comments
I'm guessing that you either didn't set the CUDA_HOST_COMPILER correctly inside the CMake GUI or didn't select the x64 platform target. CUDA_HOST_COMPILER should point to the proper MSVS 2019 x64 version of cl.exe. Looks like this on my machine: I have no issues building these examples with CUDA 10.2 (I don't have CUDA 1.0 installed), MSVS 2019, OptiX SDK 6.5.0, and CMake 3.17.3. Since that CUDA_HOST_COMPILER assignment is broken inside the FindCUDA scripts present inside this legacy repository for MSVS versions 2017 and above which have then in a different location than MSVS 2015 and earlier, you could also rename or delete the FindCUDA folder and FindCUDA.cmake script in your local repository. That local FindCUDA versions was only required for very old CMake versions which hadn't the correct code, yet. Means when using CMake's version of the FindCUDA.cmake it will correctly set the CUDA_HOST_COMPILER automatically. Somebody else claimed in an issue that this was not actually working but I don't see that. In my case it will set CUDA_HOST_COMPILER to Make sure you have set the CMake "Optional Platform for Generator" field to x64 or nothing will work. I tried both methods just now and I don't see the issue you're reporting. Both "Rebuild Solution" runs for Release and Debug targets built without errors when having the FindCUDA folder and FindCUDA.cmake renamed. In any case, I do not recommend using any of these outdated OptiX API based examples for development today |
Another reason for NVCC to fail would be if you still used the CUDA 11.x toolkit because the translation to PTX uses the Kepler Streaming Multiprocessor target 3.0 in these projects which is not supported inside CUDA 11.x anymore. Which CUDA toolkit version is used inside the CMake generator is selected by the environment variable CUDA_PATH. You should be able to see if the correct CUDA toolkit is used inside the Cmake GUI CUDA variables. Unfortunately MSVS doesn't report the actual errors of custom build steps by default or it would have been clear immediately what the actual problem is in your case. When you ever see that a custom nvcc rule fails, you can get the nvcc compiler output by raising the verbosity inside MSVS via |
Hi @droettger, I sincerely thanks for your assistance. You were right, the problem was |
The IL_LIBRARIES needs to point to the DevIL.lib in your DevIL installation. The 3rd party dependencies are found more automatically inside the newer OptiX 7 examples I linked above. |
Hi!
First I tried to build the repository with OptiX 7.4 and CUDA 11.5. However, as of the older dependencies, that did not work.
Later I tried to build the repository for OptiX 6.5.0, and CUDA 10.0 with MSVS 2019 (64bit) following the discussion (https://forums.developer.nvidia.com/t/build-errors-in-optix-advanced-samples/107275).
Unfortunately, the building process with CMake was success, but while opening the
.sln
and opening any project (as startup project
), it is not working showing theMSB8066 Error
. How can I get rid of it and run the sample codes? Here is a screen shot:The text was updated successfully, but these errors were encountered: