开发者

VS2010 C and C++ - enforce ANSI compliance for Linux/gcc compatibility?

I'm taking a class in which I'm required to write some C开发者_C百科++ apps for Linux. I really, really dislike the dev tools available under Linux, but I love VS2010.

Is there any sort of compiler switch which will enforce ANSI or gcc compatibility in VC++? Or can I swap the compiler out for gcc and still use the VS environment?


You can disable Microsoft extensions to the ANSI C and ANSI C++ standards by specifying the /Za flag, which will make the compiler emit errors if you use non-standard C and C++ features.

http://msdn.microsoft.com/en-us/library/0k0w269d(v=VS.100).aspx

However, this doesn't preclude you from using platform specific headers.


This blog post seems to discuss something similar to what you're after.

I can't seem to find better info than this MSDN document regarding VS2010 ANSI compatibility.

Some alternatives to VS2010 include MonoDevelop - which supports C#, VB.Net, C/C++.

There's also Eclipse IDE for C/C++ Dev.

This stackoverflow question may also be of use.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜