XCode 2.0 linker woes ( Tiger )

Posts: 1,199
Joined: 2004.10
Post: #1
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 ( glew.sf.net ), 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...
Quote this message in a reply
Posts: 370
Joined: 2002.04
Post: #2
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?

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Posts: 1,199
Joined: 2004.10
Post: #3
I'll rebuild libpansicore -- but it seems odd to me that the other app -- which also links against libpansicore -- builds fine.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Xcode 4 migration woes.. SparkyNZ 3 9,857 Sep 23, 2013 12:00 AM
Last Post: naeem.paracha
  XCode Woes DesertPenguin 4 4,178 Sep 11, 2007 01:22 PM
Last Post: TomorrowPlusX
  Ambiguous Linker Error Jaden 1 2,716 May 28, 2007 11:52 AM
Last Post: JeroMiya
  XCode woes icklefrelp 5 4,704 Jan 30, 2007 12:05 PM
Last Post: OneSadCookie
  OpenPlay on Tiger/XCode 2 MacFiend 17 9,712 Dec 10, 2006 03:55 PM
Last Post: akb825