Julia Set - CUDA by Example - Can you help me set up the project?

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

P.S. Here is a link to the book: https://developer.nvidia.com/content/cuda-example-introduction-general-purpose-gpu-programming-0
Chapter 4 is the one that contains Julia Set example.

What compiler/IDE do You use? Visual Studio or Nsight Eclipse?

Hello, than you for your time
I use VS 2010 on Win 7 64 bit and my CUDA version is 5.0

What header files includes get ‘red-underlined’?

MK

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

And it is an error, not a warning

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.

MK

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

Here is it:
http://www.mediafire.com/?66pmnd6t0atq1mm

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++”.

Hope this helps!

Add two include:
#include “cuda_runtime.h”
#include “device_launch_parameters.h”
It might work…