Linking to a bundle?
Linking to a bundle?
- Subject: Linking to a bundle?
- From: Randy Croucher <email@hidden>
- Date: Tue, 10 Feb 2004 17:07:19 -0800
Hello,
I have a library that I need users to be able to dynamically load via
CFBundle calls, or statically link to as if it were a dylib (isn't that
all a bundle is anyway is a dylib nested in a couple hidden folders?).
It seems from the reading that I have done that the appropriate way to
make this library is to make it a Bundle. So I created a new target of
type "Carbon Loadable Bundle", and I can load it and execute code in it
via CFBundleCreate and CFBundleGetFunctionPointerForName, but I can't
seem to figure out how to statically link to it.
I have an application that needs to make calls into the above mentioned
bundle, and these calls come up as unresolved from the linker
(obviously). So I drug the product down into the app's "Frameworks and
Libraries" folder, but it did not help. I added -lFoo.bundle to the
"Other Linker Flags", and it didn't work either (I tried a dozen other
variances of this too). Is there a way to explicitly say what to link
to, -lFoo seems to prepend lib and add .a or .dylib on the end so it is
looking for libFoo.a or libFoo.dylib, when my bundle is called
Foo.bundle.
How can I make a dynamic library that works either way? I believe I
could choose to make a target that is a "Carbon Dynamic Library" (I
have linked statically and dynamically to a single one of these). But
I want it to be packaged as a bundle with resources. I suppose I could
make the bundle directory structure myself?
Any help would be greatly appreciated,
Randy
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.