iDevGames Forums
XCode 2.0 linker woes ( Tiger ) - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Tools & Technology (/forum-10.html)
+--- Thread: XCode 2.0 linker woes ( Tiger ) (/thread-5569.html)

XCode 2.0 linker woes ( Tiger ) - TomorrowPlusX - May 2, 2005 04:17 AM

So, my game ( reasonably large, about 55kloc of C++ ) compiled and ran *fine* under Panther, using Xcode 1.5. It runs in fact, under Tiger, just fine.

But, when I duplicate the project, clean it ( from Xcode and by deleting the build/ folder ) and rebuild from scratch, it won't link. I get about 400 warnings ( and one error ) from the linker, of this form:

/usr/bin/ld: warning multiple definitions of symbol std::__throw_underflow_error(char const*)
lib/libpansicore.a(functexcept.o) private external definition of std::__throw_underflow_error(char const*)in section (__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libstdc++.dylib(single module) definition of std::__throw_underflow_error(char const*)

And another,

/usr/bin/ld: warning multiple definitions of symbol std::wcout
lib/libpansicore.a(globals.o) private external definition of std::wcout  in section (__DATA,__data)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libstdc++.dylib(single module) definition of std::wcout

And so on, probably for every definition in the std:: namespace. Yeesh.

(The static library libpansicore.a is a universal toolbox library of mine)

What's interesting, is that I have a separate project linking against the same libraries as this project, specifically libglew.a ( ), libode.a, libftgl.a, libfreetype.a, and libpansicore.a. This other project builds fine.

Anyway, the fact that this second project builds and links fine implies that something's foobar with my project settings for the first project. But what? I've been comparing the two project, side by side and can't find any significant differences. And rebuilding this project from scratch takes about 15 to 20 minutes so I'm getting tired of trial and error.

Can any body help? I'm beating my head against the wall...

XCode 2.0 linker woes ( Tiger ) - Steven - May 2, 2005 06:58 AM

Have you rebuilt libpansicore.a with the latest developer tools? A clean build sounds like a good thing to try.

What does the error look like?

XCode 2.0 linker woes ( Tiger ) - TomorrowPlusX - May 2, 2005 07:20 AM

I'll rebuild libpansicore -- but it seems odd to me that the other app -- which also links against libpansicore -- builds fine.