CUDA and Code::Blocks

I want to start programming with CUDA in Code Blocks
I installed successfully CUDA 4.0 and I’m working with ubuntu 10.04
I follow this adress to create the nvcc compiler
my problem is how to create a CUDA program in Code::Blocks, i don’t know if i should create a project which contains 2 files (the first file .cu contain the host code and the second .cpp contain the device code) or i should create a project which contain 1 file .cu which contain the whole code

I suggest you to take a look at nsight (eclipse with CUDA plugins) for linux available with CUDA 5.0

To get Cuda 5.0 you have to register as developer here: