Re: Linking to Carbonized Shared Library
Re: Linking to Carbonized Shared Library
- Subject: Re: Linking to Carbonized Shared Library
- From: Daniel Stark <email@hidden>
- Date: Tue, 22 Oct 2002 14:19:05 -0500
After investigating <mach-o/dyld> I decided to try and use the
dlcompact code to open and link the library. I run the following code:
void *hso;
hso = dlopen("../tokenizer.shlb",RTLD_LAZY);
if (!hso){perror(dlerror());exit(EXIT_FAILURE);}
and I get the following error:
dlcompat: dyld: /Users/dstark/stamp/build/stamp malformed library:
../tokenizer.shlb (not a Mach-O file, bad magic number)
: Undefined error: 0
stamp has exited with status 1.
I have been looking through the documentation to try to figure out what
type of library this is and how to use it but I don't think that I'm on
the right track. I tried loading the library into a CFBundle and
loading the executable with CFBundleLoadExecutable( myBundle) but my
app crashes with a signal 10 (SIGBUS). Any other idea's as to how I can
open and use this library? If anyone could point me to sample
cocoa/carbon code or documentation that "talks" to a *.shlb that would
be great.
Thanks,
Dan
On Monday, October 21, 2002, at 05:11 PM, Vince DeMarco wrote:
>
On Monday, October 21, 2002, at 02:53 PM, Daniel Stark wrote:
>
>
> I am trying to interface with a shared library from parallax
>
> <http://www.parallaxinc.com/html_files/downloads/
>
> downloads_tokenizer.htm>. I have looked over their documentation and
>
> linux sample code to get started but I haven't been able to "talk" to
>
> this static library. The linux code makes use of dlopen() and dlsym()
>
> to open and link the linux shared library. I have gathered from
>
> Apple's documentation and searching the archives that these commands
>
> are not available by default in X but that there is a tool to use
>
> them that is part of the fink project. What are the Cocoa/Carbon
>
> equivalents on these commands? I found other documents in Apple's
>
> Docs regarding using dynamic libraries and frameworks but none that
>
> deal with shared libraries.
>
>
>
> I was hoping someone could point me at some documentation that deals
>
> with interfacing with shared libraries in X. Also, if anyone is
>
> interested in helping to create a gui basic stamp editor for OS X I
>
> would enjoy a collaborative effort.
>
>
>
>
look in
>
>
<mach-o/dyld.h>
>
>
vince
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.