Catastrophic error: Compilation Problem on XP

Hi All,
I just started learning CUDA and have installed the 1.0v of it. While compiling one of the examples from the SDK I am facing some issues.

What I am doing is that I have copied the boxFilter example at a different location, since I wanted to see as to what are the settings required for VS2005.
So this is the error what I am getting, when I compile the file.

1>------ Build started: Project: NewBoxFilter, Configuration: Debug Win32 ------
1>Catastrophic error: could not open source file “”
1>1 catastrophic error detected in the compilation of “”.
1>Compilation terminated.

The command line argument which I am passing is as follows

nvcc.exe -ccbin “C:\Program Files\Microsoft Visual Studio 8\VC\bin” -deviceemu -c -DWIN32 -D_DEBUG -D_CONSOLE -Xcompiler “/EHsc /W3 /nologo /Wp64 /O2 /Zi /MTd " -I"c:/cuda/include” -I"C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc" -o Debug\NewBoxFilter.obj NewBoxFilter.vcproj

Am kind of stuck at this point as I didnt find much info about it on this fourm.

Any advice would be highly appreciated


Hi sandeepvirdi,

Shouldn’t it rather be something like:

nvcc.exe -ccbin "C:\Program Files\Microsoft Visual Studio 8\VC\bin" -deviceemu -c -DWIN32 -D_DEBUG -D_CONSOLE -Xcompiler "/EHsc /W3 /nologo /Wp64 /O2 /Zi /MTd " -I"c:/cuda/include" -I"C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc" -o Debug\NewBoxFilter.obj

Note the at the end of the nvcc invocation (might be a copy-past error). If you have renamed your cu-source file, you must also change this accordingly in the nvcc command line, as long as I know.


Hello Eric,
Thanks for the reply. Now there seem to be a confusion, as to, if I see the project properties of NewBoxFilter project, then I get the command line option which I had posted earlier. However in the file listing, in the IDE, I see, that the file is named as, and if i right click on this file, and see the properties page, then here is what I get,

nvcc.exe -ccbin “C:\Program Files\Microsoft Visual Studio 8\VC\bin” -deviceemu -c -DWIN32 -D_DEBUG -D_CONSOLE -Xcompiler “/EHsc /W3 /nologo /Wp64 /O2 /Zi /MTd " -I"c:/cuda/include” -I"C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc" -o Debug\boxFilter.obj .

Do you notice that at the end of my prevoius command line option,in my previous post, it has a newboxfilter.vcproj. I am bit cluless here.

Also I am using a build rule for CUDA. I picked up the Cuda.rules files from this forum only. Some one has posted it.

Please find the buildlog.html attached with this post.

~ Sandeep
BuildLog.htm (10.4 KB)

Hi Sandeep,

okay, I understand your confusion :). I haven’t tried the nvcc.rules yet, but this is what worked for me:


Copy <NVIDIA_SDK_ROOT>/projects/boxFilter to a new directory named <NVIDIA_SDK_ROOT>/projects/newBoxFilter

[] Rename the boxFilter. files to newBoxFilter.* (also the project files boxFilter.sln, boxFilter.vcproj)

Search/replace all occurences of “boxFilter” in newBoxFilter.sln and newBoxFilter.vcproj by “newBoxFilter” (these are actually XML files you can edit with any editor of your choice)

Fix the include in accordingly to #include <>

Maybe something got messed up by renaming some files or editing some of the build settings.

Hope this helps.



Hi Eric,
Here is what I did.

  1. I created a new “Empty” console VS2005 project called NewBoxFilter.
  2. I copied the files,,boxFilter_gold.cpp in this project directory
  3. I added these files in the project, as “Add existing files”.
  4. Next I set up the path to the cuda includes, namely, c:/cuda/include;C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc
  5. As mentioned I used the Cuda rules file. I am attaching this file with this post.

So I guess i dont need to rename the files right?. Since I have created a new project and included these files in that empty project.

It should have worked right?

~ Sandeep.

[attachment=3805:attachment] (1.9 KB)

Hey Sandeep,

I followed your steps, using the attached nvcc rule file and it went all just fine. I only had to exclude from compilation (is it is included into, adjust the linker settings to look in $(CUDA_LIB_PATH);…\common\lib" and add the libs cudart.lib, cutil32D.lib, and glew32.lib. So I guess that’s kinda bad for you :( … sorry. Actually I’m also a little bit confused here.

Anyways, you are perfectly correct that you do not have to rename the files at all.

Maybe you should check wether you are really using the correct build rule or start off from a copy of the original project.

Regards and good luck

PS: see the attached BuildLog.htm (sorry for it being in German but you should recognize the most important parts)
BuildLog.htm (14 KB)

Hi Eric,
Danke schon!!!.. :-)

Well coming to the issue. I created this new project, NewBoxFilter in a new location all together. Its D:\MSTest\NewBoxFilter to be exact. I have not made it under the Nvidia SDK folder where all the examples reside.
So I have to give the absolute path for include directories and also the absolute path for inclusion of the libraries.
I have included cudart.lib cutil32D.lib glew32.lib libraries in the linker settings and also I have set the Additional Libraries Directories as C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\lib;C:\CUDA\lib in the linker settings.

Going through your buildlog.htm, I see that you have a relative path for the include directory and also in your post you mention setting up the linker path, which is also relative. Is it that you are creating this new project at the same location where all the example projects with CUDA sdk are, namely “C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects”. So are you creating this new project at this location. I have a guess that you are.

After spending a year in Germany, working at Fraunhofer IMK, St. Augustine, and then having worked for Bosch India for 2 years i don’t have much problem with German language. Although I don’t know the language, but I know how to decode it to english.!!! :))

~ Sandeep.

Hello Sandeep,

you are welcome :)! It’s interesting to hear about your past in Germany. I am actually German but I’am writing most of my study related work in English (I’m an IT student at the Technische Universität München).

Getting back to your problem: Yes, you are absolutely correct in guessing that I’ve placed my project within a subdirectory of the “C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects” folder. But I don’t think that it generally makes a difference whether you’re using absolute or relative paths. Still, I remember that one of the early CUDA versions was not working correctly if the path to the CUDA Toolkit, respectively nvcc contained blanks. I’m not sure if this still applies to the 1.0 release. But anyways it seems to me that you’ve installed CUDA into the default location C:\CUDA so at this point you’re fine.