Jump to content
  • Advertisement
Sign in to follow this  
TheAsterite

Trouble setting up VS2010 to compile c with cuda.

This topic is 2407 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

visual studio 2010 will only compile C through the VS2010 command prompt.


Nonsense. Just name your files .c instead of .cpp in your solution.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!