I\'ve been trying to use the CUDA driver API to load a .ptx file and a function from it with this code:
CUdevice device;
cuDeviceGet(&device,0);
CUcontext ct
For those who does not know how to add cuda.lib into linking process like me (using VS2017):
Right click on the project, goto Properties at the bottom of the menu
Goto Linker-->Input
In Additional Dependencies, make sure that cuda.lib is there. In my case, this solved the 2019 link error.
Besides, if you click on the edit item in the drop menu, there is a Macros button that you can click and view all pre-defined Macros in your VS project.
Those errors occur when you are not linking against cuda.lib.