Author Topic: MSVC compiler versions support  (Read 4098 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
MSVC compiler versions support
« on: February 22, 2014, 04:56:04 pm »
With GCC, we have one main compiler interface defined, that detects different versions.  However, with MSVC, each new version is given a new (separate) definition.  It would probably not be a good idea to merge the MSVC id's we already have into a single interface (due to compatibility with older Code::Blocks versions), however, would there be a problem with redefining msvc10 to mean all versions MSVC, 2010 and newer?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: MSVC compiler versions support
« Reply #1 on: February 22, 2014, 09:12:04 pm »
...just my 2 cents...:

If you want to merge them - better call it plain msvc. Projects using msvc7/8/9/10/.../13 (?!) as compiler ID should default to msvc which is the one detected with the highest version number. Thus, the detection algorithm should start with msvc13,10,9,8,... the one first found should be used in "legacy" msvc projects.

Surely it may break projects that use i.e. msvc7 on a computer having msvc7 an a higher version installed... so it could be done more smart, too... nevertheless - a conversion is needed, definitely with user information and probably with user interaction.

Reminds me: How would you setup projects that use an old (i.e. MSVC6) and a new (i.e. msvc11) compiler together? There are projects to my knowledge that do so due to incompatibility with more recent compilers. TrueCrypt for example... Even I have two msvc compilers at work: The professional and the free one. For GCC its as simple as to create a copy of the compiler pointing to another path - it should be a s simple as that for MSVC , too then... obviously.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: