Tiger hoses C++ compatability

Member
Posts: 198
Joined: 2005.01
Post: #1
From the topic you probably think I'm talking about something else. Smile It's true that GCC 4.0's C++ libraries won't link against a 3.3 (Panther) binary, and vice versa.. all well known stuff.

What's maybe not as well known is that a Tiger-compiled C++ app will not run at all on Panther. I've set my GCC to 3.3 at the command line, tried messing around with build settings, so on and so forth... but Tiger now links against several additional dylibs that were not present in Panther, even on a developer machine:

/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.3.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

Apparently both of these were only available statically linked in Panther. It's looking like I'll be stuck compiling the app on Panther to release it unless there's something I'm missing here... that or making it link the whole thing statically. What a faux paux!

Anyone have any other ideas for how to work around this? Or if I missed some setting somewhere... Maybe there's an Xcode setting to make it totally switch gears into Jaguar/Panther mode for things like this?

Cryptic Allusion Games / Cryptic Allusion, LLC
http://www.cagames.com/
Quote this message in a reply
Member
Posts: 144
Joined: 2004.07
Post: #2
Dan Potter Wrote:What's maybe not as well known is that a Tiger-compiled C++ app will not run at all on Panther.

Correction, they will not work in anything below 10.3.9

Those extra libraries were included with the 10.3.9 update
Quote this message in a reply
Member
Posts: 198
Joined: 2005.01
Post: #3
Oh, did they include those in the 10.3.9 update? That'd be great.

Well, I really ought to rename this thread "Need a problem to solve itself? Post a question on iDevGames!" Because I exited Xcode, started it up again, and then did the old clean and rebuild for one more try, and it works now. I did all these same things a few minutes ago with no result. Mad This is like the second time I've had this happen. I run into a weird problem, I post a question on here, and then it mysteriously fixes itself Wow

Carlos, you're sitting on a gold mine here Wink

Maybe gcc_select doesn't take effect until you exit and restart Xcode or something?

Cryptic Allusion Games / Cryptic Allusion, LLC
http://www.cagames.com/
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
Just to make sure everything's clear in people's minds:

C++ applications built with GCC 4.0 will not work on versions of Mac OS X less than 10.3.9
C++ applications built with GCC 3.3 will work on all versions of Mac OS X
The OS on which you compile the application is irrelevant*

(OK, not quite true -- remember to use the appropriate SDK, etc)
Quote this message in a reply
Member
Posts: 41
Joined: 2005.02
Post: #5
Dan Potter Wrote:Maybe gcc_select doesn't take effect until you exit and restart Xcode or something?

Correct. Now I need my message to be long enough to not be ignored.

~ Travis
Quote this message in a reply
Member
Posts: 198
Joined: 2005.01
Post: #6
Great. Thanks for the pointers Smile

Cryptic Allusion Games / Cryptic Allusion, LLC
http://www.cagames.com/
Quote this message in a reply
Member
Posts: 31
Joined: 2004.09
Post: #7
Hi all,

what/where can I find gcc_select?

I've just discovered, to my mild horror, that my Tiger compiled app will not work in 10.3.8 or earlier. Not good. So I need to compile with a version of gcc < 4.0 it would seem...

Thanks.
Quote this message in a reply
Member
Posts: 31
Joined: 2004.09
Post: #8
OK, a googling found it. I expected it to be an Xcode preference, nestled in amongst all the myriad millions of other frightening options, but of course, that would be too simple wouldn't it? So, from the Terminal, this should do the trick:

sudo gcc_select 3.3

Compiling now, and crossing fingers.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #9
If you don't want to change your system compiler, you can also modify your build rules to use a different compiler just for the project.
Quote this message in a reply
Member
Posts: 31
Joined: 2004.09
Post: #10
Ah, thanks. Could you please elaborate on what I'd need to do this, exactly?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #11
in the build rules tab for your target, find the C files (system compiler) rule and attempt to edit it to use a specific version of gcc. You won't be allowed to, but it'll suggest duplicating it. Once duplicated, you can edit the copy (at the top of the list) to use the compiler you want.
Quote this message in a reply
Member
Posts: 31
Joined: 2004.09
Post: #12
Ok, thank for that.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Codewarrior and Tiger LongJumper 4 3,429 May 3, 2005 06:30 PM
Last Post: LongJumper