Menu

different compilers

Osito
2007-10-20
2012-09-26
  • Osito

    Osito - 2007-10-20

    Are there #defines I can add to my project so that it's easy to switch between the MS compiler and Dev's gcc compiler?

     
    • Anonymous

      Anonymous - 2007-10-20

      For macros to identify many compilers, target architectures, and operating environments see: http://predef.sourceforge.net/index.php

       
    • Osito

      Osito - 2007-10-20

      I figured it out eventually with google and experimentation:

      GNUC and GNUC_MINOR and GNUC_PATCHLEVEL are defined if you're using gcc, and will allow you to add the compiler version to your Help-About screen if desired (e.g. gcc-3.4.5 or gcc-4.2.1)

      _MSC_VER is defined when using the Microsoft Compiler, and for the free 2008 version it is 1500. I think 2005 version is 1400, and so forth.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.