Static library confusion
Static library confusion
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