The cesspool of compilers & editors

Started by
16 comments, last by TheTroll 17 years, 2 months ago
Well, my primary concerns for switching are portability and speed. In those regards gcc is better than msvc. What I meant with opensource has nothing to do with my own codebase, but rather using opensource programs.
Advertisement
What you're facing is a configuration/setup issue. Indeed, this is usually the most difficult step when switching toolsets. I suggest you decide on an IDE/compiler combination, a GUI library, and dedicate some serious time to setting things up, e.g. posting on related newsgroups (or here) when you face an unexpected issue.

Solve the issues one by one, and don't be bogged down or frustrated. You'll end up with a working environment, and hopefully you can publish the steps you took to solve the issues you encountered for those that attempt to do the same thing in the future.

A while back, I successfully built wxWidgets 2.4 using both MinGW and Cygwin, so I can tell you it's definitely possible, and I might be able to provide help with it if you decide use that combination [smile]

Quote:Original post by Megin
Well, my primary concerns for switching are portability and speed. In those regards gcc is better than msvc. What I meant with opensource has nothing to do with my own codebase, but rather using opensource programs.


When you say 'speed' do you mean final executable or compiling speed?

Personally, I've never had any major compatiblity issues between VC++8 and GCC; indeed my own GTL lib compiled more or less straight out of the box on GCC for ARM9 (a couple of pre-processor problems was all I had) and with very little changes on OS X (PPC version iirc).
You could save yourself some compiler-related pain (in exchange for other forms of pain) by working on Linux instead. Since GCC and Makefiles are the primary way of working on there, they work much more reliably and easily than when the tools and libraries are ported to Windows. Most of the time you don't even have to download and compile the library yourself - you get the package manager to install the development libraries, and then you use them. If you do have to do it manually, you can typically just read the instructions that tell you to type ./configure and make and then it works with no problem. (It doesn't always work perfectly, but it seems more reliable than on Windows.)

If you want to write portable code, you could develop it primarily on Windows using VS, and occasionally test it and fix it on Linux with GCC (with no need for a decent IDE). You could use something like VMware to make it easier to work on both platforms, though it's not great for performance.

I'm also not sure what you mean in terms of speed - I've usually found VS to produce slightly faster code, and to compile slightly faster. (In particular, GCC doesn't seem to support incremental linking at all (unless I'm missing some magic flag?), and I'm working on a project that takes a couple of minutes to link after every change. I actually gave up and installed the (free, non-commercial) Intel compiler on Linux just because it cuts the linking time down to a few seconds...)
hm... I've heard reports of gcc generating code that runs about 10-15% faster then its msvc counterpart. Also, I will probably switch to linux eventually (can't stand vista), but there's just too many programs I'm using that are windows only (or whose windows versions are still better then the linux ones). So for now I'd like to find a windows based solution.
Quote:Original post by Megin
hm... I've heard reports of gcc generating code that runs about 10-15% faster then its msvc counterpart. Also, I will probably switch to linux eventually (can't stand vista), but there's just too many programs I'm using that are windows only (or whose windows versions are still better then the linux ones). So for now I'd like to find a windows based solution.

from my actual testing the exes from gcc are quicker than vc by a few percent but the actual compile times in vc are a lot faster, thus i tend to use vc for development (which also has a better ide + debugger) + gcc for the final build

using both compilers is also a good method for finding bugs
One thing that I did find out (and like) about gcc is that it is far more strict (with errors and warnings) regarding the source code it will parse.
All depends on the settings you use in VC. If you set the warnings and errors to maximum it is pretty darn strict.

theTroll

This topic is closed to new replies.

Advertisement