User forums > Using Code::Blocks
Compiler plugin for nvcc compiler?
Jenna:
Copy the gcc toolchain and create one for cuda. ("Settings -> Compiler and debugger... -> Global compiler settings -> GNU GCC compiler -> Copy")
Create a sample project and save it as template ("File -> Save project as template...").
To reuse it choose "File -> New -> From template -> User templates".
Mark Knecht:
Like the Cross Compiler stuff in the Wiki, right?
http://wiki.codeblocks.org/index.php?title=Code::Blocks_and_Cross_Compilers
I'm working on it but I don't have the paths right yet. I'll get back to that later. For now I'm only doing CUDA so I can leave it alone.
One last thing. How do I set the lexar for the *.cpp file type to also be used for this new *.cu file? Currently I'm only seeing black & white. As CUDA files are essentially C++ I might as well use it.
You guys have been so helpful! Thanks! I messed around with Qt-Creator for a few days and couldn't get half this far.
Cheers,
Mark
Jenna:
"Settings -> Editor -> General settings -> Syntax highlighting for -> C/C++", then click on "Filemasks..." and add *.cu to the list.
Mark Knecht:
Lovely! I now have color and can build projects. Great results. I'm truly indebted!
I'll work on the template stuff a bit more before I ask more questions. Over an out for now.
Thanks,
Mark
killerbot:
once you get everything really working ok, it would be nice to copy the section in your default.conf about the nvcc compiler, together with other things you adapted to get the file type recognized and all.
We might add it to the CB core then.
Just take your time, till you are sure everything is there. Most difficult parts are probably the compiler/linker options and the regexes for the parsing of the errors/warnings.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version