• 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
Static library confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static library confusion


  • Subject: Static library confusion
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 6 Jan 2009 15:10:49 +0000

MY GC app is required to link to a static library : libZonicKRM.a
The library is documented to support GC apps.

I have added the library to the project and linking proceeds okay.
But when code in the library is called the console reports a dlopen() error - see below.


Why is dlopen() being called at all?

Running otool against the binary shows nothing obviously untoward.
The binary image seems large enough that the static lib has been linked.

Is this a naming clash? or just core ignorance?

A demo app is supplied incorporating libZonicKRM.a and it runs okay, both for unmanaged and managed memory.
The ld command lines for the faulty app and the working demo are below.


Thanks in advance.

Faulty app console report:
=====================
Error loading /Users/Jonathan/Library/Caches/Cleanup At Startup/ uk.co.zonic.zonickrm/client_2836_1231252747/ZonicKRM.bundle/Contents/ MacOS/ZonicKRM: dlopen(/Users/Jonathan/Library/Caches/Cleanup At Startup/uk.co.zonic.zonickrm/client_2836_1231252747/ZonicKRM.bundle/ Contents/MacOS/ZonicKRM, 262): no suitable image found. Did find:
/Users/Jonathan/Library/Caches/Cleanup At Startup/ uk.co.zonic.zonickrm/client_2836_1231252747/ZonicKRM.bundle/Contents/ MacOS/ZonicKRM: GC capability mismatch


Link for Faulty app
===============

Ld /Users/Shared/Debug/KosmicQuitter.app/Contents/MacOS/KosmicQuitter normal i386
cd /Users/Jonathan/Documents/Computing/KosmicQuitter/trunk
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/ MacOSX10.5.sdk -L/Users/Shared/Debug -L/Users/Jonathan/Documents/ Computing/KosmicQuitter/trunk -F/Users/Shared/Debug -filelist /Users/ Shared/KosmicQuitter.build/Debug/KosmicQuitter.build/Objects-normal/ i386/KosmicQuitter.LinkFileList -mmacosx-version-min=10.5 -lZonicKRM - framework Cocoa -framework Quartz -framework QuickLook -framework Carbon -prebind -o /Users/Shared/Debug/KosmicQuitter.app/Contents/ MacOS/KosmicQuitter



Link for Working demo app ======================

Ld "/Users/Shared/ZonicKRM Demo.build/Debug/Cocoa Demo.build/Objects- normal/i386/ZonicKRM Demo Cocoa" normal i386
cd /Users/Jonathan/Documents/Computing/KosmicQuitter/Kagi/Demo/ Project
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/ MacOSX10.5.sdk -L/Users/Shared/Debug -L/Users/Jonathan/Documents/ Computing/KosmicQuitter/Kagi/Demo/Project/../../Libraries/Xcode -F/ Users/Shared/Debug -filelist "/Users/Shared/ZonicKRM Demo.build/Debug/ Cocoa Demo.build/Objects-normal/i386/ZonicKRM Demo Cocoa.LinkFileList" -mmacosx-version-min=10.5 -lZonicKRM -framework Cocoa -framework Carbon -prebind -o "/Users/Shared/ZonicKRM Demo.build/Debug/Cocoa Demo.build/Objects-normal/i386/ZonicKRM Demo Cocoa"


Jonathan Mitchell

Central Conscious Unit
http://www.mugginsoft.com




_______________________________________________ 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: Static library confusion
      • From: "Mark Wagner" <email@hidden>
  • Prev by Date: Re: debugging external makefile projects
  • Next by Date: Umbrella framework?
  • Previous by thread: Re: Instruments runs forever
  • Next by thread: Re: Static library confusion
  • Index(es):
    • Date
    • Thread