• Advertisement
Sign in to follow this  

Trouble setting up VS2010 to compile c with cuda.

This topic is 2140 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So like the title says, I'm having some trouble compiling a .c file with a cuda function that does nothing to start it off. The reason I need c is because that's what my professor wants in the homework. Now I have the 32bit version of cuda downloaded, and I tried setting the global paths in the properties manager, but every time I compile my hello world program it says it can't find the cuda.h file. I'm compiling it using the "cl helloWorld.c" command in the visual studio 2010 command prompt. I've also tried compiling the helloWorld.c file using "nvcc helloWorld.c", but I'm getting a lot syntax errors with that.

Does anyone know step by step what I need to do to set it up properly? I'm using cuda version 4.1 32 bit.

Share this post


Link to post
Share on other sites
Advertisement
I've looked at the tutorials that use the IDE, but I can't use that because I have to compile C not C++. And visual studio 2010 will only compile C through the VS2010 command prompt. I've tried to set up the environment with the IDE like that, but it's not working correctly. If I make an empty project with VS, and create a .c file with it, when I compile using the command prompt will it use the environment setup from the project?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement