I create a new Win32 Console App as an empty project I am running Windows 7 64bit with Visual Studio 2008 C++. I am trying to get the sample code from the bottom of this ar
In visual studio 2019:
Double check the availability of CUDA_PATH environment variable.
Configuration Properties -> VC++ Directories -> Include Directories -> Add $(CUDA_PATH)\include
Configuration Properties -> VC++ Directories -> Library Directories -> Add $(CUDA_PATH)\lib\x64
Configuration Properties -> Linker -> Input -> Additional Dependencies -> Add .lib files under $(CUDA_PATH)\lib\x64 and ignore existing .lib files.
I guess you are missing to link to the correct library. Make sure you have the CUDA library added under "Configuration Properties->Linker->Input". Refer this.
Two things are needed:
Add CUDA path:
Go: "Configuration Properties->Linker->General->Additional Libary Directories" and add $(CudaToolkitLibDir)
to the list.
Add CUDA runtime library:
Go: "Solution Properties->Linker->Input->Additional Dependencies" and add cudart.lib
to the list.