3

I like the Visual Studio IDE. I'm used to it and find it is the best IDE I've ever tried. We also find increasing use of C#/.NET here.

However, after the underwhelming announcement regarding C++11 features in VS11 I'm looking into replacing the compiler.

It seems that the Intel compiler fully integrates with VS but that doesn't mean it will compile our Windows code. I don't know how I'd fare with a try of g++ or clang

Can VS actually be productively used with a different C++ compiler to compile Windows code, that is legacy code using all kinds of Win32 / MFC / COM stuff?

3
  • 4
    Why wouldn't the Intel compiler compile your Windows code? Commented Sep 27, 2011 at 15:44
  • 1
    There are certain features of Visual C++ that Intel's C++ compiler aren't compatible with: read the compatibility chart. One of the big things is 'attributed code', which the MFC may use, but which Intel's compiler doesn't support. Commented Sep 27, 2011 at 15:47
  • About my C++11 features link: Herb Sutter does some explaining right at the start of this video. Commented Sep 28, 2011 at 11:20

3 Answers 3

1

Depends on how much use you made of the Microsoft-proprietary extensions. Things like #pragma once tend to be supported by all the major compilers, but the weirder COM things (e.g., #import and anything C++/CLI) probably won't be. No idea if MFC will build under the new compiler, but you'll probably have to link it statically or ship your own DLL; G++ definitely uses a different mangling scheme than MSVC.

I'm not sure how easy it is to replace cl.exe and keep your vcproj files intact (though some compilers actually do it), but there are always Makefile projects.

Sign up to request clarification or add additional context in comments.

1 Comment

+1 specifically for mentioning the MFC-DLLs and different mangling schemes
0

I have never actually worked with the Intel C++ compiler, but I see no reason why it wouldn't compile the code that VC++ does. Here is official Intel documentation.

Comments

0

I use Visual Studio 2008 with a Makefile project to cross-compile; no reason you couldn't do the same with a different Windows compiler.

1 Comment

If you cross compile, you probably do not have any Win32 or MFC stuff in there, or do you? (Note: I wouldn't mind makefile projects as such if the code compi9les.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.