%(CUDA_LIB_PATH) problem

I started CUDA programming on my laptop with a Geforce GT335M (Optimus).

For the project setup, I referred to a few websites showing how to setup the custom build rules and CUDA directories.

But unfortunately, I had been facing LNK2019 errors or sometimes “cudart.lib not found” error with the following Hello World sample code.

#include <iostream>

__global__ void kernel()

{

}

int main(){

	kernel<<<1,1>>>();

	std::cout<<"Hello World!"<<std::endl;

	system("pause");

	return 0;

}

My initial library files directory was indicating “(CUDA_LIB_PATH)" which is "(CUDA_PATH)/lib/x64” as my laptop has a 64bit Windows 7 installed.

Not being pretty sure, I changed the library path to “$(CUDA_PATH)\lib$(PlatformName)” and voila, the compilation was working.

Curious about the solution, I tried $(CUDA_PATH)\lib\Win32 and worked as well but once I change Win32 to x64, errors occurred again.

Even though the issue was resolved, I’m pretty not sure what this 32bit and 64bit of the CUDA library actually means. As long as I know, due to having a 64bit OS, shouldn’t I have the programs compiling and running on CUDA 64bit? Did anyone here experience a similar problem like me??

Your enlightenment will be appreciated. Thanks in advance.