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)