Thanks for the feedback and we have put in a fix for this.
The nvcc command line has --keep-dir “Debug” and so intermediate files are dumped in the “Debug” directory.
However the commands are ran in the current directory, so the MyKernel.cudafe1.stub.c file was not found by the preprocessor phase and was causing the error.
Suggested workaround for now:
Remove
--keep-dir "Debug"
from nvcc command line. This would cause intermediate files to be created in current directory.
Add
"-I."
to the nvcc command line.
If the path specified in
--keep-dir "path"
is given the absolute path instead of the relative path, i.e. C:\PittpattDetection-4.2.2_CUDA_Reconocimiento\ PittpattDetection\Debug , the compilation should work correctly.
I modified Daniel @ NV’s workaround in the following way:
instead of removing --keep-dir “Debug” I put $(SolutionDir)$(CudaIntDir) into Keep Directory option, so it expands to the full path.
Error is still here.
I put all this long command line into cmd.exe shell and nvcc said it can’t find cl.exe in $PATH. It’s strange because command line contains
-ccbin “D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64”. So why does it look into $PATH?
When I run vcvarsx86_amd64.bat in this command line then again invoke nvcc, it works.
When I remove --use-local-env switch, it makes attempt to compile but fails with finding windows.h
All this was done with NVidia bandwidthTest example from 4.0 RC2
VS2005 and 2008 work fine but switching to an older one than VS2010 is not a good idea for me because this will force me to abandon using AVX commands
I have just installed VS2010 and converted all my old projects.
They all used to work fine in VS2008, but I get exactly this same ‘MSB3721’ error when trying to compile a new (or just converted) CUDA project.
This also happens even when creating a new project from scratch, using Visual Studio’s wizard (File->New->Project->Nvidia->CUDA->CUDA 4.0 Runtime).
The only CUDA projects I managed to compile are the samples provided with the SDK.
Does anybody have any thoughts about it? I tried all suggestions on this topic and none worked for me.
Also, this seems to be the only thread regarding this issue.
Did you manage to try out the above suggested solution?
Right-click on your project and then select Properties. After that navigate to the CUDA C/C++ tab on the tree and click on “Common”.
From there, you should see a field named “Keep Directory”. Delete any value that might be in this field.
Under CUDA C/C++ tab → Command Line, please key in -I. under Additional Options box. (Note: the value to be keyed in is -I. , please don’t forget the . behind -I )
I was able to fix it with these steps you just described! Indeed I was not including the command line ‘-I.’ correctly.
However, the funny thing is that there was something else causing the error too.
What I noticed is that when I applied your suggestion, it fixed only some of the solutions that were not working.
Than I realized that the others that did not get fixed had white spaces in some of the sub-folders’ names they were kept and renaming them or moving the solution to another folder without white spaces fixed the problem.
If I either remove your suggestion or add white space to the folders names, the error starts again.
The interesting thing is that in vs2008 with CUDA 4.0 I did not have problems with the folders’ names.
I’ve got same problem with “exited code 1â€. No described solution worked.
Here my solution:
Run VS2010 as administrator (Win7 - 64 bit), that’s it g
First approach was to compile under DOS => copy the nvcc command to a cmd-session. Here I had to add first some include paths (e.g. for windows.h) and had to change the ObjBase.h as described in The Official NVIDIA Forums | NVIDIA . Unlike in VS2010 here I’ve got error-messages (and warnings:). Do somebody know how I can get this warnings (and errors) in VS2010 too.
Strange 1: the cmd-session was NOT started as administrator!
Strange 2: in VS2010 I did not had to make any changes to the settings (include paths or anything else, even the IUnknown error in ObjBase.h was not there)
Hello Guys,
I am running VS10 with win7 and CUDA 5.0. I have been trying all the above for a week now and keep getting the same error back. I am student working on a final year project. It is a realtime Kinect sensor application which is why i was advised to use cuda to speed up the processes. I am however very new to cuda.
Could anyone help me debug this error. I can setup team viewer on my computer so that perhaps someone more experienced can offer to remotely access my computer and help me debug this one? Please let me know.