It is a total begginers question. I have been reading CUDA by Example and have come across Julia Set example. I have downloaded source files from the Web and tried to include them in a new CUDA project (5.0 version in my VS 2010).
But when I add header files from source code into my new CUDA project I still can not #include it in my main.cu as the #include line is underlined with red.
Can you please specify each step that is needed in order to add already exsisting header and .cu file into my CUDA solution? I would be the most grateful as all other examples before this one worked excellent.
Thank you very much
IntelliSense: PCH warning: header stop cannot be in a macro or #if block. An intellisense PCH file was not generated. c:\users\ivan\desktop\cuda ivan\fullreport\common\cpu_anim.h
Did You create the project Yourself or imported an existing one? It seems that it uses precompiled headers (PCH) and something is wrong with it. Try creating the project without precompiled headers.
I created blank CUDA application and inserted an exsisting items into it (.h and .cu files from books source code). How do I import a CUDA project? There is no project, only source files, that’s why I am asking
You do not really need to case about the Intellisense errors. It is visual studio trying to guess beforehand what will happen during compilation but since it does not have an overview of everything that you have in your cuda c/c++ properties, it will throw off errors because it lacks information.
The easiest way (I find) to create a cuda project is to use the custom build rules. Right click your current project, go to “build customizations” and select, in your case, “CUDA 5.0” from the list. This will more or less setup your compilation environment.
After that you may need to tell visual studio that your main.cu should be compiled with nvcc. To do that, right click that file, properties, general, set “item type” to “CUDA C/C++”.