View Full Version : ISO/ANSI standard with Visual studio 2005
moowy
15th April 2007, 21:21
Hi,
I'm using qt with visual studio 2005 and I'm wondering if I can define an ANSI flag in microsoft compiler (because I need to write ansi compliant code). Do you know if this is possible with this compiler ??
wysota
15th April 2007, 23:14
ANSI as in "ANSI C" or ANSI as in "C++ compliant with this or that standard of C++"?
I think MSVC 2005 is compliant with the latest standard of C++. Versions prior to 2003 were not.
moowy
15th April 2007, 23:19
ANSI as in "ANSI C".
wysota
15th April 2007, 23:25
Did you encounter any specific incompatibilities with MSVC?
moowy
16th April 2007, 00:04
I haven't encountered any problems, while developing. The problem is, that I want to tell the compiler to warn me (or at the apropriate time give me an error) when I'm doing something which isn't accordingly to the ANSI standard.
I used to compile code with gcc under linux with -ANSI flag (which did the trick for me).
wysota
16th April 2007, 00:11
So develop with MinGW. I'm sure the -ansi switch works there the same way as in Linux. Then you can do the final compilation with msvc if you need it.
moowy
16th April 2007, 12:49
Ok. I guess there is no other way to achieve the same thing with microsoft compiler. Tnx for your help.
wysota
16th April 2007, 13:04
I didn't say there is no way, I just wasn't able to find it yesterday.
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.