Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Apple Framework in place of my Dylib how

 
   Macintosh computer (Home) -> General Discussion RSS
Next:  "Out of memory" error in Word 2004 open..  
Author Message
p.lavarre

External


Since: Oct 20, 2006
Posts: 2



(Msg. 1) Posted: Fri Oct 20, 2006 8:30 am
Post subject: Apple Framework in place of my Dylib how
Archived from groups: comp>sys>mac>programmer>misc (more info?)

> Subject: call Mac gcc -framework from CTypes how
> Newsgroups: comp.lang.python

Sometimes I write tedious wrapper shim C for Mac OS X:

#include <IOKit/IOKitLib.h>
void * aliasedIONotificationPortCreate(int arg1)
{
return IONotificationPortCreate(arg1);
}

gcc -dynamiclib -framework IOKit builds this C so that I can call it
from a separately-linked C program, such as Python CTypes.

Given that I can call the aliasedIONotificationPortCreate in the Dylib
that I built, can I somehow call the IONotificationPortCreate in the
Framework that Apple built instead, and skip the drudgery of writing
the tedious wrapper shim C?

Thanks in advance, Pat LaVarre

 >> Stay informed about: Apple Framework in place of my Dylib how 
Back to top
Login to vote
p.lavarre

External


Since: Oct 20, 2006
Posts: 2



(Msg. 2) Posted: Wed Oct 25, 2006 11:50 am
Post subject: Re: Apple Framework in place of my Dylib how [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> can I somehow call the IONotificationPortCreate in the
> Framework that Apple built instead,

$ cd /System/Library/Frameworks/
$ cd IOKit.framework/Versions/Current/
$ file IOKit
.... Mach-O dynamically linked shared library ...
$ nm -m IOKit | grep IONotificationPortCreate
.... (__TEXT,__text) external _IONotificationPortCreate
$

Looks like it will work. Not named .dylib or .so, but correct `file`
type and relevant `nm -m` symbols.

Thanks all for help offline, especially Nlzero.com,

 >> Stay informed about: Apple Framework in place of my Dylib how 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Is here the right place for ODBC programming questions ? - Hi, as you see, the question is the subject. I have problems to test building my software on sf's compile farm. I am porting my software to Mac OS X and I stuck at the linking part of building my ODBC wrapper module. Question: Where are placed the..

need starting place for coding iCal .ics files - I need to make a calendar dynamically (starting/end dates inputted and different events created and named for each week in between) and I don't know where to start. I started entering each week by hand and thought that was dumb plus if I generalized it....

Python framework installation: test_macostools failed failed - Hello. I hope this is the right place for my question. It's about python, but it is OS X specific, and in python forums noone could help me yet. I tried to do a Python 2.3.4 framework installation on my Mac OS X 10.3.5. I configured as described in the..

Where can I get an Apple Loops DVD - I had to re-format my hard drive. I've got FCP installed but the loops are grayed out in SoundTrack. I have looked everywhere for the Apple Loops DVD and I can't find it anywhere. Anyone know where I can get one? 2nd question. I'm not able to import...

Apple Assertions - Apple has an article (sample code? technote? MacTech article?) describing their assertion mechanism -- Check, NCheck, Assert, etc. Does anyone know what I'm talking about? I can't seem to find the article. -- Steven Fisher; sdfisher@spamcop.net
   Macintosh computer (Home) -> General Discussion All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]