I found out what the problem is. In the rule file, it specifies the path of nvcc.exe is VC’s installation path under VS. So after the above steps, we need to copy the bin folder from CUDA to the VC’s bin folder under VS.
Hi JaredHoberock and thanks for this nice CUDA rules file.
I was wondering if there is a way to have such rules for MS Visual Sutdio 6 and 2003? Any Idea?
Regards
I’m not sure; I was under the impression build rules may have been a new addition to VS2005. It may be much more tedious to integrate nvcc with an earlier version of visual studio.
Continually dealing with this sort of thing finally caused me to switch to linux :D
fatal error LNK1104: cannot open file ‘.\Debug\cuda.obj’
Tried everything listed here so far, The sample programs Create the obj file just fine, I guess there is an include or link I am missing, but I have included everything from the project properties to match the one I am creating, also I have tried copying the Cuda files from the sample programs and creating a new project (copy paste the .cu there and add to project), I get the same problem in build time.
Thanks,
KungfuPanda
Hi,
I got this error when I was trying to setup my environment:
1>------ Build started: Project: matrixMul, Configuration: Debug Win32 ------
1>Performing Custom Build Step
1>matrixMul.cu
1>Command-line error: invalid option: --compiler_bindir
1>1 catastrophic error detected in this compilation.
1>Compilation terminated.
1>Linking…
1>LINK : fatal error LNK1181: cannot open input file ‘.\Debug\matrixMul.obj’
1>Build log was saved at “file://c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\matrixMul\Debug\BuildLog.htm”
1>matrixMul - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
And here is my command line:
CommandLine=“nvcc.exe -ccbin "$(VCInstallDir)bin" [Emulation] -c [Defines] -Xcompiler "/EHsc [Warning] /nologo /Wp64 [Optimization] /Zi [RuntimeChecks] [Runtime] [TypeInfo]" [Include] -o $(ConfigurationName)$(InputName).obj $(InputFileName)”
Outputs=“$(ConfigurationName)$(InputName).obj”
Could you please let me know why this happens?
Thanks a lot.
I wanted to create my own project,and I have set the lib and inc path.
However,when I compiled the project,the error occured.
[font=“Times”]int main(…)
{
CUT_DEVICE_INIT(); // the error is in this line
......
}[/font]
the complete error information:vs_error.bmp
If I delete the line " CUT_DEVICE_INIT();",the program can be compiled correctly,
but can not run correctly. An error is that can not found cutil32D.dll!
Who had ever ran into this problem?Pelease tell me the resolution!
I’v made a VS2005 project wizard for CUDA, from the rule.
Then it doesn’t need to set Emu* again.
[url=“http://forums.nvidia.com/index.php?showtopic=65111”]The Official NVIDIA Forums | NVIDIA
Anyone solved the LNK1181 problem?
I was having the issue with CUDA 2.2 in Visual Studio 2005 before doing the following:
- In the Tools | Options… dialog, click Projects and Solutions | VC++ Directories. Here, you need to add the following paths to the CUDA instal directory, and the CUDA SDK directory where the example projects are. The following directories are where I installed them, and the defaults, I believe.
- Executable Files
c:\CUDA\bin
- Include Files
c:\CUDA\include
C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc
- Library Files
c:\CUDA\lib
C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA CUDA SDK\common\lib
- Source Files
C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA CUDA SDK\common\src
NOTE!!!: These need to be done for the correct Platform that you are going to be compiling on, either Win32 or x64. You might be getting the linker error, as I was, because you are compiling for a Win32 program. If this is the case, set it to x64, and the linker error goes away.
- Change the Solution Configuration setting on the Standard toolbar to Win32 or x64, depending on your system and whether you installed the 32-bit or 64-bit version of CUDA on your machine.
For me, these were the only modifications to VS I needed to make to get any of the example projects to run. Hope this helps!