Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking on MacOS X 10.2.1



On Wednesday, October 30, 2002, at 03:35 PM, email@hidden wrote:

---------------------- dlopen error:dlcompat: dyld: root/bin/root.exe malformed library: RooFitCore/tmp/lib/RooFitCore.a (not a Mach-O file, bad magic number)


Are you sure you built that library? It wasn't in the archive prebuilt from linux? try running "file" on it to see what it is.


Usually dlopen() is used on shared objects (.so), not static (.a) libraries.


This package builds a shared object library (.so), by default, but the linker has trouble. I really only need one version of the library, so I'll refrain from giving the details unless someone thinks it might be easier to build.

To build a shared object on Mac OS X, you need to link with "-bundle" instead of "-shared". You also usually specify "-bundle_loader /path/to/executable" to reference the external symbols that might be used in the shared object. If you don't know the bundle_loader you can specify "-flat_namespace -undefined suppress"


-Ben
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.



References: 
 >Linking on MacOS X 10.2.1 (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.