comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: getpid in Mac OS X
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: getpid in Mac Os X [message #39788 is a reply to message #39785] Fri, 11 June 2004 08:36 Go to previous messageGo to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> IDL>pid=CALL_EXTERNAL('/usr/lib/libc.dylib','getpid')
> % CALL_EXTERNAL: Error loading sharable exectuble.
> Symbol: getpid, FILE=/usr/lib/libc.dylib
> not a Mach-O MH-BUNDLE file type

I am no OS X expert nor a CALL_EXTERNAL expert, but I nevertheless have
a theory about what's happening. You might want to double-check this
theory with RSI to make sure that I'm not way off base.

It seems that IDL is looking for a file with the MH_BUNDLE file type
flag. MH_BUNDLE is typically used by code which is loaded at runtime.
The file extension on such files is .bundle.

The /usr/lib/libc.dylib has MH_DYLIB as the file type flag. MH_DYLIB is
meant for dynamic shared libraries. I'm not sure why IDL can't load
this file at runtime as it can on Linux, but my guess is that the
library is only "shared" in the linker sense of the term rather than the
executable sense. Keep in mind this is just a guess -- I don't know
enough of the internal workings of OS X libraries to say for sure.

Whatever the case, a better solution to the problem would be to create a
little DLM as an interface into the libc library rather than trying to
call commands out of the library directly. On OS X, you could create a
bundle file which calls the getpid() function in libc. IDL shouldn't
have a problem loading this bundle.

-Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: dates transformation
Next Topic: Re: dates transformation

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 01:05:45 PDT 2025

Total time taken to generate the page: 0.16199 seconds