开发者

Is there an open source for free tool for MS Visual C++ Express to build using gcc?

开发者 https://www.devze.com 2023-03-02 07:21 出处:网络
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

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,开发者_JAVA百科 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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消