installing cuda toolkit not able to find input file cudart.lib

hi,

i am getting a serious problem to run cuda programs in visual c++ platform.
i followed the instructions to set the path in the visual studio 2005 and tried to run the program,but one error is coming i.e
fatal error LNK1184:=can not find the input file cudart.lib.
since several environment variables are defined with the cuda toolkit libraris ,i tried to remove the old version of NVIDIA_tootlkit_2.2_win32.exe for reinstallation,but i couldn’t succed.
can any body help me how to install cudatoolkit in winxp.

the instruction that i followed is give below:

At this point, I have a CUDA-enabled program, but I don’t have it integrated into a Visual C++ project. It actually takes a bit of work to do that. To start, I brought up the Visual C++ 2005 Express Edition IDE and clicked on the New Project button (you can also use File→New→Project… from the menu). In the New Project window, I selected Win32 as the project type and Win32 Console Application as the template. I gave the project the creative name of example1 and set its location to the C:\llpanorama\CUDA\examples directory. After clicking OK in the New Project window, and then clicking Finish in the Win32 Application Wizard window, a window opened with a simple code skeleton. I replaced the code skeleton with the code shown above.

After saving the code, I right-clicked the example1.cpp file, selected Rename from the drop-down menu and renamed the file to example1.cu. Files with the .cu extension are intended to be processed by nvcc. nvcc will extract the kernel portion of example1.cu and compile it for execution on the CUDA device while using the Visual C++ compiler to compile the remainder of the file for execution on the host.

In its default configuration, Visual C++ doesn’t know how to compile .cu file. It has to be told explicitly how to do this using a Custom Build Step. This is done by right-clicking on the example1.cu file and selecting Properties from the drop-down menu. In the Property Pages window that appears, set the Custom Build Step command line as follows:

Configuration Properties → Custom Build Step → General:
Command Line =
“$(CUDA_BIN_PATH)\nvcc.exe” -ccbin “$(VCInstallDir)bin” -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/MTd -I”$(CUDA_INC_PATH)” -I./ -o $(ConfigurationName)\example1.obj example1.cu

In addition to setting the command line for the example1.cu file, the location of the output file is specified as follows:

Configuration Properties → Custom Build Step → General:
Outputs = $(ConfigurationName)\example1.obj

After setting the file properties, the properties for the example1 project have to be modified. Here are the project property settings I used for the Debug configuration:

Configuration Properties → C/C++ → General:
Additional Include Directories = $(CUDA_INC_PATH);”C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc”

Configuration Properties → C/C++ → General:
Debug Information Format = Program Database (/Zi)

Configuration Properties → C/C++ → Code Generation:
Runtime Library = Multi-threaded Debug (/MTd)

Configuration Properties → Linker → General:
Enable incremental linking = No (/INCREMENTAL:NO)

Configuration Properties → Linker -> General:
Additional Library Directories = “C:\CUDA\lib”;”C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\lib”

Configuration Properties → Linker → Input:
Additional Dependencies = cudart.lib cutil32D.lib

Configuration Properties → Linker → Optimization:
Enable COMDAT folding = Do Not Remove Redundant COMDATs (/OPT:NOICF)

with regards

prasanta.

Prasanta,

You should not post this in CUDA contests… This is reserved for “CUDA competitions”. YOu should post in “CUDA programming & development” forum.

My 2 cents:

  1. Is cudart.lib present in “c:\cuda\lib” ?

  2. Why dont you use “$(CUDA_LIB_PATH)” instead.

  3. Always use double-quotes around “path” evnmt variables. U have used it right in some places. Some places it is missing…

btw, Your post is quite detailed and shows u have done your homework correctly… But yeah, you should post it in the correct forum to expect a response. The forum is quite active and u will get answers quickly.