Take the 2-minute tour ×

While the Microsoft compiler typically builds faster code, I'm in an environment where building Linux applications with gcc is required. I prefer MSVS and the Express versions as my IDE and have been able to configure it such that Intellisense and all the other nice features are working. However, I have been unable to find an easy way to get VC++ Express 2010 to build using gcc. I'm not sure if I remember correctly, but I thought about half a decade ago there was support to switch compilers when using MSVS.

I have found an extension to download claiming to do this, but it costs about $50. Does anybody know of any free or open source tools that can accomplish the above?

share|improve this question
Probably not - VS Express doesn't allow extensions. –  Andrew Medico May 3 '11 at 22:07
Sorry, wrong word... "External tool" would have been better usage. Not that it's difficult to pick up on the meaning from the above explanation, but nitpicking does help keep everyone's vocabulary in check. –  Hazok May 3 '11 at 23:45
add comment

2 Answers

As I realize there are no plugins, but you could simply setup some custom build rules and make gcc compile your project instead of the cl.

Google for the Custom build rules in Visual Studio / provide your own makefile. Also note that if you wish to still have the ability to debug your applications, you should probably look for something like WinGDB.

The good thing in this approach is that you can switch your configurations from cl to gcc, for example and easily test if your application remains compilable in both of them.

Still, the best way would probably be to use some automatic building tools like cmake or scons, which simplify the process greatly and can help you to switch to any other IDE in a matter of minutes.

Personally I like scons, because it's python-driven, but cmake is very nice to start from.

share|improve this answer
Also to mention, that faster code by cl is obviously a myth. –  Yippie-Ki-Yay May 3 '11 at 21:41
Unfortunately, Googling for that search screen returns a lot that doesn't get to what I'm asking for. I'm not the only person that has looked for such a tool, so if it's as simple as you say then it's likely someone else has already done it. I'm not trying to recreate the wheel and develop a new tool here... I'm looking for something that will be easy to import into what I'm already doing. –  Hazok May 3 '11 at 23:34
Ah, see, I'm not the only one... I just found a better explanation of the issue, the majority of which I've already tackled. The last piece is getting gcc to work without having to modify the file extensions or to just find a tool to do this (like I mentioned previously, there are tools like this available, such as the WinGDB you mentioned, but I'm looking for free or open source tools). –  Hazok May 3 '11 at 23:43
add comment

Try CMake: http://www.cmake.org/. It is a cross-platform, cross-ide build system. It will generate
VS project for you, and ordinary makefiles (or eclipse, or what you need). Then, use VS to edit the code, and "make" to build it. I did it myself to develop windows + linux on virtual machine. And it worked fine.

share|improve this answer
Can this be done directly in the IDE? I already have makefiles and can build from command line, the goal here is to get VC++ to build using gcc instead of cl. –  Hazok May 4 '11 at 1:57
No, it can't. You need to create "special makefiles" for it. Then run "generator" which will create VS solution and makefiles. –  Piotr May 4 '11 at 10:07
Bummer. After much searching on this, it seems there's really no open source or free tool to accomplish this. I'll play around with the cmake this weekend though and see what I can do. Maybe I'll end up making my own tool and contribute to the open source cause (I just think it would be awesome to force a Microsoft tool targeted to work for Linux). –  Hazok May 5 '11 at 1:16
PS - If that works decently well, I'll upvote your answer and if I can somehow wrap CMake as an external tool and get it done directly from the IDE, I'll definitely give you the answer on this one. –  Hazok May 5 '11 at 1:17
add comment

Your Answer


