• 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
Re: Xcode not linking static library
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode not linking static library


  • Subject: Re: Xcode not linking static library
  • From: Luc Vandal <email@hidden>
  • Date: Thu, 25 Oct 2007 11:15:00 -0400

I did, but I don't see any errors while linking the library, just the "undefined externals" errors...

Building target “randomid” of project “randomid” with configuration “Release”


Checking Dependencies
Ld "/Users/lucvandal/Edovia/Clients/HW/VRSMac PPC-INTEL/lpn/source/ VRMacOSX/randomid/build/randomid.build/Release/randomid.build/Objects- normal/ppc/randomid" normal ppc
cd "/Users/lucvandal/Edovia/Clients/HW/VRSMac PPC-INTEL/lpn/ source/VRMacOSX/randomid"
setenv MACOSX_DEPLOYMENT_TARGET 10.2
setenv NEXT_ROOT /Developer/SDKs/MacOSX10.2.8.sdk
/usr/bin/gcc-3.3 -o /Users/lucvandal/Edovia/Clients/HW/VRSMac\ PPC-INTEL/lpn/source/VRMacOSX/randomid/build/randomid.build/Release/ randomid.build/Objects-normal/ppc/randomid -L/Users/lucvandal/Edovia/ Clients/HW/VRSMac\ PPC-INTEL/lpn/source/VRMacOSX/randomid/build/ Release -L../LicenseManager/build -L/Users/lucvandal/Edovia/Clients/ HW/VRSMac\ PPC-INTEL/lpn/source/VRMacOSX/randomid/../LicenseManager/ build -L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 -F/ Users/lucvandal/Edovia/Clients/HW/VRSMac\ PPC-INTEL/lpn/source/ VRMacOSX/randomid/build/Release -filelist /Users/lucvandal/Edovia/ Clients/HW/VRSMac\ PPC-INTEL/lpn/source/VRMacOSX/randomid/build/ randomid.build/Release/randomid.build/Objects-normal/ppc/ randomid.LinkFileList -framework Foundation -lLicenseManager -arch ppc -Wl,-Y,1455 -mmacosx-version-min=10.2 -Wl,-syslibroot,/Developer/ SDKs/MacOSX10.2.8.sdk
ld: Undefined symbols:
_LMSerialNumberString
/Users/lucvandal/Edovia/Clients/HW/VRSMac PPC-INTEL/lpn/source/ VRMacOSX/randomid/build/randomid.build/Release/randomid.build/Objects- normal/ppc/randomid.o reference to undefined _LMSerialNumberString


Ld "/Users/lucvandal/Edovia/Clients/HW/VRSMac PPC-INTEL/lpn/source/ VRMacOSX/randomid/build/randomid.build/Release/randomid.build/Objects- normal/i386/randomid" normal i386
cd "/Users/lucvandal/Edovia/Clients/HW/VRSMac PPC-INTEL/lpn/ source/VRMacOSX/randomid"
/usr/bin/gcc-4.0 -o /Users/lucvandal/Edovia/Clients/HW/VRSMac\ PPC-INTEL/lpn/source/VRMacOSX/randomid/build/randomid.build/Release/ randomid.build/Objects-normal/i386/randomid -L/Users/lucvandal/Edovia/ Clients/HW/VRSMac\ PPC-INTEL/lpn/source/VRMacOSX/randomid/build/ Release -L../LicenseManager/build -L/Users/lucvandal/Edovia/Clients/ HW/VRSMac\ PPC-INTEL/lpn/source/VRMacOSX/randomid/../LicenseManager/ build -F/Users/lucvandal/Edovia/Clients/HW/VRSMac\ PPC-INTEL/lpn/ source/VRMacOSX/randomid/build/Release -filelist /Users/lucvandal/ Edovia/Clients/HW/VRSMac\ PPC-INTEL/lpn/source/VRMacOSX/randomid/ build/randomid.build/Release/randomid.build/Objects-normal/i386/ randomid.LinkFileList -framework Foundation -lLicenseManager -arch i386 -Wl,-Y,1455 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/ MacOSX10.4u.sdk
/usr/bin/ld: Undefined symbols:
_LMSerialNumberString
/Users/lucvandal/Edovia/Clients/HW/VRSMac PPC-INTEL/lpn/source/ VRMacOSX/randomid/build/randomid.build/Release/randomid.build/Objects- normal/i386/randomid.o reference to undefined _LMSerialNumberString
collect2: ld returned 1 exit status



On 25-Oct-07, at 10:55 AM, Fritz Anderson wrote:

On 25 Oct 2007, at 8:40 AM, Luc Vandal wrote:

I know I'm missing something obvious here, but I have problems with a static library that I've used on other project. I've created a Cocoa Foundation Tool, added the static library to the "External frameworks and libraries" folder in the project view, included the header file in myproject.m for the library's functions and the library was automatically added to the "Link binary with libraries" folder under Target. When I try to compile and link in release, I get unresolved externals. Xcode dosen't even seem to link the library, seems like it ignores it!

So I compared the project settings with another project that uses this library and unless I miss something, their settings are exactly the same! Then I tried to create a new Cocoa Application to see if I could link the library and I got the same error...

I don't hear that you have looked at the actual build transcript, to verify that the working and non-working builds have the same settings. (Build Results window, bottom-left corner of the upper scroll view, button that looks like lines of text.)


Maybe you could post the link commands for the two.

	— F


_______________________________________________ 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: Xcode not linking static library
      • From: Fritz Anderson <email@hidden>
References: 
 >Xcode not linking static library (From: Luc Vandal <email@hidden>)
 >Re: Xcode not linking static library (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Adding Frameworks Not Installed in /System/Library/Frameworks
  • Next by Date: Re: Xcode not linking static library
  • Previous by thread: Re: Xcode not linking static library
  • Next by thread: Re: Xcode not linking static library
  • Index(es):
    • Date
    • Thread