Jump to content
  • Advertisement
Sign in to follow this  
SiS-Shadowman

Compiling pure C under MSVC

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

I'have some faire knowledge of compiling c++ under MSVC (2008) but I have to create pure c programms for class. I know that there's no difference if I compile my code as c++ (ie. I don't have to change my code), however I don't want to use c++ by accident (or possibly use something I would think is pure C, but isn't). So my question is, what do I need to do in order to compile my projects in pure c under MSVC 2008?

Share this post


Link to post
Share on other sites
Advertisement
Look through C/C++ project configuration. There's an option for Compile as C code.

That's as close as you'll get, MVC isn't known for strict C (whatever that means today) support, but it's close enough.

Share this post


Link to post
Share on other sites
well if you right click on the project, go to properties, and look under C/C++->Advanced, you can set the "Compile As" field to "Compile as C Code"

*edit* blast!

Share this post


Link to post
Share on other sites
If you just name your files "foo.c" then VC++ will compile them as C by default. Also, I should probably just mention that VC++ is a C89 compiler - it doesn't support many of the newer features from C99 which means a C program written with GCC will often times fail to compile with VC++.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!