GCC, MinGW, Dev-Cpp,CBuilderX etc


#1

I’ve seen the GNU toolchain and the IDE’s that run it getting somewhat of a bum rap here about bloated executables, only static linking, etc, etc, so I thought I’d throw in a comment or two about using these tools.

Firstly, the GNU toolchain runs on more platforms and contains more language front-ends and code-generating backends that you can shake a stick at: expecting it to be quite as “tight” as a pure platform-native compiler is a bit rich, really. That being said code performance/size comparisons are for the most part acceptable, if the toolchain is configured correctly. If you want the tightest possible code then go with the (expensive) Intel compiler which beats even msvc hands-down. Of course then you’re, as with msvc, bolloxed if you’re doing cross-development to OSX. GNU gcc is of course the platform compiler for OSX.

For windows developers using whatever version of Visual Studio, of course compiling native windows apps is a piece of piss: you need to know next to bugger-all about the toolchain to get your executable. Using the free compilers to get comparable results just takes a little bit of effort to understand what’s what. So here’s some what’s what about gcc & in particular MinGW gcc :smiley:

  1. MinGW gcc never repeat never statically links against windows system DLL’s. When you specify, say -lgdi32 to the linker it pulls in an import lib to resolve the function names only, which is of course exactly how msvc does it as well. For the really paranoid you can instead of specifying the import lib with “-lgdi32” supply the complete path to the dll itself - “c:\windows\system32\gdi32.dll” and the linker will resolve the needed names on-the-fly. Again absolutely no static code is imported from the DLL, just the function name stubs. This direct linking unfortunately doesn’t work for all DLL’s in the system directory ( but it does for gdi32.dll & wininet.dll among others). To compile a simple JUCE app you can specify c:\windows\system32\gdi32.dll c:\windows\system32\wininet.dll -lwinmm -lrpcrt4 -lvfw32 as linker parameters, and it’ll link just fine. I don’t think you really gain anything except a marginally faster link time with this though.

  2. The GNU linker leaves a lot more symbolic information inside the executable by default in all configurations, so make sure you specify the “-s” linker option for release builds to remove all the extra cruft.

  3. Building JUCE 1.14 with Dev-Cpp 4.4.9.2. The version 1.14 .dev project file has files missing from the project so it will build ok, but you’ll be left with undefined symbols when you try to link an application. Specifically the directory src\juce_appframework\gui\components needs the source files in that directory added. Also before you open the .dev file make the output directory “juce\bin” and ensure there are no spaces in your directory paths. Copy the dsound.h file from an SDK or someplace and you should be set to go.

If anyone is having problems with the gcc toolchain,dev-cpp,CBX, or Eclipse feel free to gimme a shout and I’ll try to help. Maybe Julian would be agreeable to me trying to knock together a Dev-Cpp “DevPak” for JUCE & a skeleton app template to ease the pain. I had at one time a DevPak for the VST & VSTGUI SDKs, but I was unfortunately not at liberty to distribute it because of Steinbergs licencing policy.

cheers, Colin


#2

Well I quite fancy Eclipse/CDT but all that wanking about with makefiles and command line compiler guff just puts me off. Take me all day just to start a new project!

Despite a certain amount of hatred, MSVC + Visual Assist X works for me.

Oh and Dev-Cpp was absolute gash-biscuits last time I looked.

Interesting post though. I may still be open to persuasion but I don’t think my boss would like me spending a lot of time switching development tools!

MSVC = shite

MSVC + Visual Assist = quite usable

can’t see me using gcc until we get a mac to be honest.


#3

Oh I love Visual Assist, I couldn’t imagine coding without it. Anytime I goto coding with normal MSVC++ or DevC++ or whatever the heck else is out there I just want to shirk away and take a magnet to the disk…

I’ve still yet to see an IDE as good as MSVC++ and Visual Assist…


#4

My opinions on all this are that the gnu tools are very good - I’ve no problems with gcc itself, but all the IDEs I’ve seen are absolutely appalling. I’d love to ditch MSVC and use something more ethical, but there’s just nothing I could use without ripping my hair out in anger every time I need to debug. Even XCode on the mac is terrible, although it’s improving all the time. Maybe one day Eclipse will become usable, but it’s been a while since I looked.

Thanks for the heads-up about missing files in the dev-cpp build; I try to remember to add them all but haven’t been testing the build from that recently, so must have missed a few. And sure, if you want to throw together any build stuff for it, please be my guest.


#5

Yep. VA is vital. I was having some issues with asio4all driver crashing the entire machine while debugging. VA always got me my edits back! It can be a bit flaky tho, for some reason I have to almost fully type “actionListenerCallback” before it appears in the list.

But…

NOTHING , BAR NOTHING, IN THIS UNIVERSE COMPARES TO InteliJ IDEA

which is only for Java unfortunataly :frowning:

you could do like "someObject.methodThatDoesNotExistYet( aString, anInteger ) " and it would ask you if you wanted to create the method, and it would fill in the blanks (params,return) and put the cursor ready to code the method! Joy!
And you could select a bunch of code anywhere, right click, choose extract method, and it would rip out the selected code, put it in a method with all relevent params/return then put the method call in for you.

Ever tried renaming a class in MSVC? :evil:


#6

[quote=“Karbon L. Forms”]you could do like "someObject.methodThatDoesNotExistYet( aString, anInteger ) " and it would ask you if you wanted to create the method, and it would fill in the blanks (params,return) and put the cursor ready to code the method! Joy!
And you could select a bunch of code anywhere, right click, choose extract method, and it would rip out the selected code, put it in a method with all relevent params/return then put the method call in for you.

Ever tried renaming a class in MSVC? :evil:[/quote]

Both of these new features are added in the new Visual Studio 2005. I just watched a demo online last night and its pretty sweet.
Ben


#7

When that happens it generally means the map is getting too large, there are instructions on cleaning it, I have a few things to do it automatically every startup, takes an additional 5 second to startup though, but I don’t mind considering how things work better.

Bah on Java… Give me Python any day over java, far more mult-platform then java and easier to use in my opinion, but it lacks anything that could be called a half decent ide… or quarter-decent…

Can’t wait to see the additions in VS2k5, I have the beta version, but it is far too lacking… in anything… (especially Visual Assist functionality) for me to go from my VC++6.0. I don’t like VC++7 personally, it seems to make larger and slower exe’s compared to VC++6 on some code I tested… Never tried Intel’s, but then again, can’t afford it, I actually buy everything I use, ever wonder why I have no money. :roll:


#8

[quote=“beno”][quote=“Karbon L. Forms”]you could do like "someObject.methodThatDoesNotExistYet( aString, anInteger ) " and it would ask you if you wanted to create the method, and it would fill in the blanks (params,return) and put the cursor ready to code the method! Joy!
And you could select a bunch of code anywhere, right click, choose extract method, and it would rip out the selected code, put it in a method with all relevent params/return then put the method call in for you.

Ever tried renaming a class in MSVC? :evil:[/quote]

Both of these new features are added in the new Visual Studio 2005. I just watched a demo online last night and its pretty sweet.
Ben[/quote]

Eh? Nah nah nah mate, that’s just for C#. I’d love to be wrong though! Only additions to VC++ seem to be managed code/.NET shite.

http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx


#9

Jings fit awfy language, loon! Are ye frae Torry, or fit? I’m frae Stoney mesel’ :smiley:

I have the 2005 VS beta here & I don’t see any refactoring support for c++…

Dev-Cpp isn’t a prime-time IDE by a long way, but then again it’s a 9MB download compared with er… how much for anything else?
Eclipse is just fantastic, but the learning curve is about as steep as it gets: especially since they use wierd terminology like “perspectives” & such.
I actually find I can code faster in KDevelop than anything else, but then again I’m one of those perverse sods that finds Autoconf/Automake easy! :shock:

cheers Colin.


#10

[quote=“0xDEADBEEF”][quote=“Karbon L. Forms”]
Eh? Nah nah nah mate, that’s just for C#. I’d love to be wrong though! Only additions to VC++ seem to be managed code/.NET shite.
[/quote]

Jings fit awfy language, loon! Are ye frae Torry, or fit? I’m frae Stoney mesel’ :smiley:

I have the 2005 VS beta here & I don’t see any refactoring support for c++…

Dev-Cpp isn’t a prime-time IDE by a long way, but then again it’s a 9MB download compared with er… how much for anything else?
Eclipse is just fantastic, but the learning curve is about as steep as it gets: especially since they use wierd terminology like “perspectives” & such.
I actually find I can code faster in KDevelop than anything else, but then again I’m one of those perverse sods that finds Autoconf/Automake easy! :shock:

cheers Colin.[/quote]

From Inverness actually. Live central aberdeen w/ central office. Big fan fan o Stoney but.

WTF you doing in Sweden? Is it the chicks?

Aye. Dev-Cpp’s fucking tosh. And makefiles are the devils work.


#11

Well you’ve seen the boilers walking around Stonehaven??

Hmm, chicks, clean air, good IT sector, and believe it or not, relatively cheap!

cheers, Colin


#12

[quote=“0xDEADBEEF”][quote]
WTF you doing in Sweden? Is it the chicks?
[/quote]

Well you’ve seen the boilers walking around Stonehaven??

Hmm, chicks, clean air, good IT sector, and believe it or not, relatively cheap!

cheers, Colin[/quote]

How much is a pint? (my boss is curious)


#13

[quote=“Karbon L. Forms”]
How much is a pint? (my boss is curious)[/quote]

In the “popular” pubs in the centre of Stockholm upto about 4 quid. You can get a bottle of beer in a good place though for under 1.40 and a pint for 2.50 if you look.

Probably the wrong sorta JUCE for this forum! :smiley:

cheers, Colin.


#14

It certainly is rather sweet. It’s just the Java part that I hate.


#15

Without caffiene and alcohol I’d wager a fair chunk of the code that exists today would never have been written. :slight_smile:


#16

[quote=“Karbon L. Forms”][quote=“beno”][quote=“Karbon L. Forms”]you could do like "someObject.methodThatDoesNotExistYet( aString, anInteger ) " and it would ask you if you wanted to create the method, and it would fill in the blanks (params,return) and put the cursor ready to code the method! Joy!
And you could select a bunch of code anywhere, right click, choose extract method, and it would rip out the selected code, put it in a method with all relevent params/return then put the method call in for you.

Ever tried renaming a class in MSVC? :evil:[/quote]

Both of these new features are added in the new Visual Studio 2005. I just watched a demo online last night and its pretty sweet.
Ben[/quote]

Eh? Nah nah nah mate, that’s just for C#. I’d love to be wrong though! Only additions to VC++ seem to be managed code/.NET shite.

http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx[/quote]

Oh your right. Sorry wishfull thinking.
Ben


#17

darn it beno you got me excited!


#18

i remember when i started c++ i did a search for refactoring tools. for some technical reason (complexity?) refactoring c++ programmatically is next to impossible but its easy with the newer java-likes.

fucking wife broke my keyboard! bastarding on screen keyboard here! fuck me my mouse will wear out soon. nightmare.

yo valley dude! long time no see! wot y jucing these days bro?


#19

[quote=“Karbon L. Forms”]i remember when i started c++ i did a search for refactoring tools. for some technical reason (complexity?) refactoring c++ programmatically is next to impossible but its easy with the newer java-likes.
[/quote]

I think lack of object reflection is likely the problem with c++.


#20

Trying to persuade my place of work that JUCE is the right x-platform toolkit with which to build medical apps.

You?