> -----Original Message-----
> From: Mike Kluev [mailto:email@hidden]
> Sent: 19 janvier 2006 14:26
> To: Pierre Thibault
> Cc: carbon-dev
> Subject: Re: Using .dylib with a CFM Application
>
> On Wed, 18 Jan 2006 17:59:50, "Pierre Thibault" <email@hidden>
wrote:
>
> > Is it possible to use a dylib from a Carbon CFM application? I made
a
> > bundle with my dylib with Xcode but while I can easily get access to
the
> > bundle executable, .dylib files are not working well when I try to
use
> > the function pointers after a CFBundleGetFunctionPointerForName
call.
> > Well, I think that bundle are incompatible with dylib. Is it the
case? I
> > have error because my app is not able to find the dylib (image not
found
> > errors). I have no problem with these dylib in my other apps.
> >
> > I made a search on the subject on the web and I was not able to find
> > how.
> >
> > Note that I don't have the source code, I only have the dylib.
> >
> > So, what should I do to be able to use it with my CFM App?
>
> Works for me without doing anything special in CFM app. Given a
> "foo.so" library, I created an empty folder, name it "foo.framework",
> renamed the library to "foo" and put it into folder. After that
> opened bundle with CFBundleCreate, loaded it with
> CFBundleLoadExecutable (optional), grab a function from it with
> CFBundleGetFunctionPointerForName and call it successfully. Do you
> get non-null function pointers with CFBundleGetFunctionPointerForName?
>
> Mike
I have .dylib files not .so files. I don't know if it the same. I
created a bundle in Xcode. Then, I added the .dylib, 5 of them, in the
MacOS folder of my bundle. The problem that I have is with the
references. I made a script that uses install_name_tool with the magic
@executable_path word. But this is not working. I have to use absolute
paths with my dylibs otherwise it does not work.
CFBundleGetFunctionPointerForName works properly. I have errors: "image
not found". The same script that I use works fine when building an
application with the dylibs instead of a bundle. If I look with otool
-L, everything looks fine.
I really would like to use relative paths for my dylibs but it does not
seem to work.
What should I do?
-----------
Pierre
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden