• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
link stage ignoring my static lib!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

link stage ignoring my static lib!


  • Subject: link stage ignoring my static lib!
  • From: Peter Mulholland <email@hidden>
  • Date: Mon, 12 Nov 2007 16:54:51 +0000

Hello xcode-users,

My project is set out in two parts.. a "Game" lib which is a BSD
static library, and the main executable which has the frontend code,
and links Game into it.

The problem is, the linker seems to be ignoring Game, even though it's
been told to link. Here's the output when I pass -t to the linker.

Ld /Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/Debug_Main/ReelDealCasino2006.app/Contents/MacOS/ReelDealCasino2006 normal i386
    mkdir /Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/Debug_Main/ReelDealCasino2006.app/Contents/MacOS
    cd /Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006
    /Xcode2.5/usr/bin/g++-4.0 -o /Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/Debug_Main/ReelDealCasino2006.app/Contents/MacOS/ReelDealCasino2006 -L/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/Debug_Main -L../../ThirdPartyLibs -L../../ThirdPartyLibs/libjpeg -L../../ThirdPartyLibs/NukeDX -L../../ThirdPartyLibs/libjpeg/include -L../../ThirdPartyLibs/libjpeg/Source -L../../ThirdPartyLibs/NukeDX/include -L../../ThirdPartyLibs/NukeDX/Source -F/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/Debug_Main -F/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/../../LocalFrameworks -filelist /Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/ReelDealCasino2006.LinkFileList -lGUID -lGame -ljpeg -framework Cocoa -framework OpenGL -framework Carbon -framework IOKit -framework SystemConfiguration -framework QuickTime -framework QuartzCore -framework AddressBook -framework QTKit -framework Sparkle -arch i386 -Wl,-Y,1455 -mmacosx-version-min=10.3 -t -isysroot /Xcode2.5/SDKs/MacOSX10.4u.sdk

/Xcode2.5/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Pass 1
/Xcode2.5/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o
/Xcode2.5/usr/bin/../lib/gcc/i686-apple-darwin8/4.0.1/crt3.o
<snip, the main executable's .o files appear here>
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/Debug_Main/libGUID.a(localGUID.o)
/Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Cocoa.framework/Cocoa
/Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL
/Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Carbon.framework/Carbon
/Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/IOKit.framework/IOKit
/Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
/Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/QuickTime.framework/QuickTime
/Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/QuartzCore.framework/QuartzCore
/Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AddressBook.framework/AddressBook
/Xcode2.5/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/QTKit.framework/QTKit
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/../../LocalFrameworks/Sparkle.framework/Sparkle
<snip, lots of other libs appear here>

/Xcode2.5/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
default_window_proc(Windows::HWND__*, unsigned int, unsigned int, long)
WinMain(Windows::HINSTANCE__*, Windows::HINSTANCE__*, char*, int)
_fopen(char const*, char const*)
gameMainTick()
gameMainShutdown()
_gUseWindowedMode
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/mainGameHooks.o reference to undefined default_window_proc(Windows::HWND__*, unsigned int, unsigned int, long)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/mainGameHooks.o reference to undefined WinMain(Windows::HINSTANCE__*, Windows::HINSTANCE__*, char*, int)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/NDX_AAFont.o reference to undefined _fopen(char const*, char const*)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/NDX_AlphaMask.o reference to undefined _fopen(char const*, char const*)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/NDX_Log.o reference to undefined _fopen(char const*, char const*)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/NDX_Misc.o reference to undefined _fopen(char const*, char const*)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/NDX_Palette.o reference to undefined _fopen(char const*, char const*)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/NDX_RLESurface.o reference to undefined _fopen(char const*, char const*)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/NDX_Surface.o reference to undefined _fopen(char const*, char const*)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/NDX_Surface_LoadBMP.o reference to undefined _fopen(char const*, char const*)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/NDX_Surface_LoadPSD.o reference to undefined _fopen(char const*, char const*)
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/GameAppDelegate.o reference to undefined gameMainTick()
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/GameAppDelegate.o reference to undefined gameMainShutdown()
/Volumes/Tiger/Projects/PhantomEFX/SinglePlayer/Casino2006/build/ReelDealCasino2006.build/Debug_Main/ReelDealCasino2006.build/Objects-normal/i386/GameAppDelegate.o reference to undefined _gUseWindowedMode
collect2: ld returned 1 exit status

Those undefined symbols are in libGame.a - but ld has ignored the file
completely! It has been told about it, as you can see it gets passed
"lGame". Thing is, libGUID.a is also part of the project and it
parses that just fine.

libGame.a is definitely being generated, and definitely contains
everything according to nm. The most fustrating part is, I have
another project set up pretty much the same way (with different code
in libGame, though), and this works just fine! On the working project,
libGame.a is parsed just after libGUID.a is.

Any ideas?

--
Best regards,
 Peter                          mailto:email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: link stage ignoring my static lib!
      • From: Wade Williams <email@hidden>
    • Re: link stage ignoring my static lib!
      • From: Lawrence Gold <email@hidden>
  • Prev by Date: Re: scroll after window resize
  • Next by Date: Re: scroll after window resize
  • Previous by thread: Re: Can't build RubyCocoa examples with xcode 3
  • Next by thread: Re: link stage ignoring my static lib!
  • Index(es):
    • Date
    • Thread