Compiling from Code::Blocks (with minGW) add CUDA features to C::B ANSI C project


I have a Geforce8600GT card, and all of the necessary softwares installed on my PC, so I can run the CUDA precompiled examples :) .

I write ANSI C applications in the Code::Blocks IDE with MinGW compiler. I have a project in Code::Blocks (ANSI C codes) to analyze huge measured data files what I would like to speed up using CUDA, since I have many FFT, and matrix operations.
I would like to rewrite parts of my code using CUDA. Is it possible to only include some CUDA headers in my code, and compile my project with the gcc?

Or I must use the nvcc.exe compiler? If so, how Can I change compiler settings in Code::Blocks (Toolchain executables?), so I could compile my existing ANSI C project with nvcc?

I tried some compiler settings in Code::Blocks, but when I tried to compile my project (no “CUDA lines” in it yet, “pure” ANSI C codes) it said: "no PATH for cl.exe. After this I have installed VisualStudio2003. Now i get this message in C::B : “cl.exe the component not found, mspdb71.dll missing”.

So, Someone could help me how I could make “CUDA compilable” my project in Code:Blocks? I only write simple data analyzer ANSI C codes, so i am really greenhorn when i have to deal with IDE compiler settings, dlls, libraries…

Thanks very much in advance,

ps.: I did google half a day before I put my question here.

(edited) ps2.:
a CUDA tutorial
in the page 18, there is something about “Integrating CUDA into larger projects”
Maybe This is what I need? But someone could explain me how to do it please?

I managed to compile my existing project, I just had to find the missing dlls, and setting some paths (still not compilable in CodeBlocks, but works from command line with nvcc.exe).

I have another question, I use the fseeko64/ftello64 functions in my project to deal with large data files. The mingw gcc compiler accepts these functions, but not the nvcc.exe. Somebody knows how to make them work under CUDA?

im intrested in a guide to setup codeblocks to work with cuda also.

this guide is for eclipse but i would really like to see a walkthrough for codeblocks…

im running ubuntu 8.04-I386-Desktop and I have Codeblocks SVN Build rev 5208 installed.

can someone do a walkthrough for a real NOOB?


i just realized this thread was a windows XP thread.

i gonna make a linux new topic so you can disreguard this.

ben has posted detailed step by step instructions on

i’m trying it now myself… it may prove useful!