Results 1 to 8 of 8

Thread: ISO/ANSI standard with Visual studio 2005

  1. #1
    Join Date
    Aug 2006
    Posts
    83

    Default ISO/ANSI standard with Visual studio 2005

    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 ??

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ISO/ANSI standard with Visual studio 2005

    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.

  3. #3
    Join Date
    Aug 2006
    Posts
    83

    Default Re: ISO/ANSI standard with Visual studio 2005

    ANSI as in "ANSI C".

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ISO/ANSI standard with Visual studio 2005

    Did you encounter any specific incompatibilities with MSVC?

  5. #5
    Join Date
    Aug 2006
    Posts
    83

    Default Re: ISO/ANSI standard with Visual studio 2005

    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).

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ISO/ANSI standard with Visual studio 2005

    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.

  7. #7
    Join Date
    Aug 2006
    Posts
    83

    Default Re: ISO/ANSI standard with Visual studio 2005

    Ok. I guess there is no other way to achieve the same thing with microsoft compiler. Tnx for your help.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ISO/ANSI standard with Visual studio 2005

    I didn't say there is no way, I just wasn't able to find it yesterday.

Similar Threads

  1. Qt + gSoap + Visual Studio 2005
    By xgoan in forum General Programming
    Replies: 3
    Last Post: 17th December 2007, 18:27
  2. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  3. Qt-4.2.2 qmake won't compile under visual studio 2005 on vista
    By moowy in forum Installation and Deployment
    Replies: 7
    Last Post: 13th January 2007, 21:06
  4. Qt 4.1.0 on Visual Studio 2005
    By nErnie in forum Installation and Deployment
    Replies: 8
    Last Post: 6th July 2006, 00:56
  5. Qt Designer & Visual Studio 2005
    By pSiCho in forum Qt Tools
    Replies: 6
    Last Post: 9th February 2006, 13:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.