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

I take a class in which I have to write some C ++ applications for Linux. I really really don't like dev tools available under Linux, but I like VS2010.

Is there any compiler that will provide ANSI or gcc compatibility in VC ++? Or can I exchange the compiler for gcc and still use the VS environment?

+6
gcc standards visual-c ++ visual-studio-2010 ansi
source share
2 answers

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

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

However, this does not preclude the use of platform-specific headers.

+9
source share

This blog post seems to be discussing something similar to what you need.

I cannot find better information than this MSDN document regarding ANSI VS2010 compatibility.

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

There is also an Eclipse IDE for C / C ++ Dev .

This stackoverflow question may also be helpful.

+3
source share

All Articles