I have a problem with cuda 4.1 and visual studio 2010. When I want to compile a .cu-file I get the following error:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.1.targets(249,9): error : The CUDA Toolkit directory '' does not exist. Please verify the CUDA Toolkit is installed properly or define the CudaToolkitDir property to resolve this error.
I got a clean windows 7 install with only vs2010, CUDA Toolkit v4.1 and the NVIDIA GPU Computing SDK (and git) running inside a VirtualBox.
I tried to specify the toolkit directory in the project properties in "CUDA Toolkit Custom Dir", but that doesn't make any difference. Even in a completely new VBox this error occurs.
Thanks for your help!
OK, I got it myself: The project I used was set up with cuda 4.0 and it did not update correctly as I installed v4.1. To update it just disable and enable "CUDA 4.1(.targets, .props)" in the Custom Build Steps.
I got the same with Cuda 9.1 on VS 2017. What solved it for me was to set the "CUDA Toolkit Custom Dir"to be the same as CUDA_PATH. see in the following link: https://docs.nvidia.com/nsight-visual-studio-edition/3.2/Content/CUDA_Properties_Config.htm in Common section, item #1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With