• Advertisement
Sign in to follow this  

The cesspool of compilers & editors

This topic is 4043 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yes, this will be a rant. After two days of this nonesense I've utterly and totally had it. Being all for opensource I decided to port my current programming project from Visual.NET to GCC. I knew this would probably take some time, but how hard could it be right? Big mistake. One of the reasons I decided to switch was that GCC 4.1+ is faster then the msvc compiler. However, the most recent version of minGW comes with GCC 3.4. I did manage to find a patch to get it to run GCC 4.1.1, after much looking. Still, using it didn't feel quite right. Also, cygwin seems far too heavy-duty for what I need. Mildly annoyed, I decide to get codeblocks. Can't do much without a decent editor right? So here is where the real mess starts. I use FLTK as GUI library and in no way, shape or form could I get it to compile with codeblocks. FLTK 2.0 comes with a project file for CB, but it just gives a ton of errors (did they even bother to try it out?). Using mingw-make is a pure hell too, and gave me even more errors. So I decide to take the lib files from a dev-cpp fltk devpak and link to those. Great, no errors! But wait... now it doesn't generate an executable. Ofcourse it's impossible to find any reading on this in documentation or forums... So I abandon CB and try dev-cpp instead. Thanks to the handy devpak system, I can get a simple fltk program compiled with a few clicks. However, dev-cpp lacks the ability to specifiy build configurations. Worse however, is its horrendous debug system. First it whines about missing debug information (yes, I have "generate debug information" on). I click on ok to have it rebuild with debug information, only to get the same question promp again! It simply will not debug. Oh, I also tried to get wxWidgets to compile with minGW (oddly, even though it has native support in codeblocks, they couldn't be bothered to create a project file for it), as an alternative to FLTK. Same problems though. So now I'm stuck with two limp editors and a compiler that has the learning curve of a flightsimulator. All this has actually managed to persuade me to keep using VS.NET... I guess what I'm really angry about is the complete and utter lack of decent documentation and user-friendly install procedures. Why does it all need to be so messy and incoherent? I admit that I'm a noob when it comes to compilers, but I'm far from a rookie when it comes to programming. Up until now I guess I just liked my comfortable little bubble that is VS.NET. So I end with a plea. Is there any decent way to fulfill my simple dream: GCC 4.1 on windows, with a decent editor and a nice, working gui library? Is it really so much to ask for? For those that actually managed to read this far: thanks for listening to my cries of despiration.

Share this post


Link to post
Share on other sites
Advertisement
Ah, the wonderful world of open source. If it makes you feel better, you're, uh, supporting freedom.

Personally, Code::Blocks is the only open-source IDE I would ever use. DevCPP is not worth your time. If you're having trouble building FLTK, google for the errors or ask around their forums. If you've run into a problem with it, most likely someone else has too.

Share this post


Link to post
Share on other sites
Yeah, freedom, democracy and all that...
I have spent a fair amount of time trying to find more information on the problem I get with FLTK (I get "'namehere' was not declared in this scope" alot). I'm also still not to sure about my patched minGW... I mean, it works, but there has to be a better solution.

Share this post


Link to post
Share on other sites
There's really nothing stopping from using VS to edit the code and then using CLI gcc to compile. Or releasing your app as open source for VS.

And yes, it's perhaps too much to expect a few skilled volunteers to hack a overlay for a compiler developed primarily with unixlike systems in mind which will be on par with an organized team of developers who have access to experts for their target OS and practically unlimited financial resources.

Share this post


Link to post
Share on other sites
Code completion and debugging are both buggy, and unlikely to be fixed since development is basically dead. Code::Blocks is actively being developed.

Share this post


Link to post
Share on other sites
I think you will do more for OSS by completing an open source project, using whatever tools, than by abandoning a working system for something else.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
Personally, Code::Blocks is the only open-source IDE I would ever use.

Theres always Eclipse.

Share this post


Link to post
Share on other sites
That's a really good point. I should have added "for C++", since Eclipse/Java is truly a great programming experience. I know Eclipse can be used for C++, but I'm not sure how mature/supported it is.

Share this post


Link to post
Share on other sites
Open source just means that anyone can edit it, so there is no problem with using Microsoft VS products becuase you can get the express version and they have stated they will keep the express versions free. Yes I know it is the "evil Microsoft" but so far I have not found a better IDE for debugging then what Microsoft puts out. Are the perfect, no, but I feel they are better then pretty much anything out there.

theTroll

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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...)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
All depends on the settings you use in VC. If you set the warnings and errors to maximum it is pretty darn strict.

theTroll

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement