🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #1063

Re: mach/mach.h and IOKit functions

#1063
From: Isaac Wankerl
Date: Wed, 06 Feb 2002 20:21
49 lines
2486 bytes
In article <3C602717.27F3AA60@vernier.com>,
 ccorbell <ccorbell@vernier.com> wrote:

> This is a slightly reworded re-post since I still
> don't know where MW stands on this....
> 
> Does CW7 support directly calling functions from mach/mach.h?

Could this be because mach/mach.h doesn't wrap itself with the 
_BEGIN_DECLS and _END_DECLS macros?  If I use

_BEGIN_DECLS
#include <mach/mach.h>
_END_DECLS

then I can link an app using panic().

> Does CW7 support directly calling functions from IOKit?

No, Pro 7 doesn't support this.

> I'm getting link errors, working with the mach-o stationery.
> The project includes System, IOKit, and CoreFoundation frameworks.
> 
> When I #define DARWIN in a prefix file, most errors go away
> but a few remain - link errors for any mach.h function,
> and also link errors I don't understand like:
>    ___mod2u is undefined
>    ___div2u is undefined

Move the MSL Runtime and crt1.o files to the end of the link order and 
it might fix this.

> The functions I'm calling are all lifted from Apple's Simple USB
> Example main.c file which works under ProjectBuilder.
> 
> Has anyone out there directly called mach.h functions with CW7?
> If so, any clue as to what I'm missing?
> 
> If it isn't supported I can use CFPlugin utilites to get
> the function pointers I need, I'd just rather not have to go
> that route, esp. since the app isn't CFM.
> 
> TIA,
> Chris Corbell

-- 
Isaac Wankerl
Metrowerks Mac Software Team
Technical Details
Message-ID: <wankerl-3A87A1.14210406022002@news.mtwk.sps.mot.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!wankerl
References: <3C602717.27F3AA60@vernier.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,d90ff54a1a5a9456
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,d90ff54a1a5a9456
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2002-02-06 12:19:06 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!wankerl
From: Isaac Wankerl <wankerl@metrowerks.com>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Subject: Re: mach/mach.h and IOKit functions
Date: Wed, 06 Feb 2002 14:21:04 -0600
Organization: Metrowerks Corporation
Message-ID: <wankerl-3A87A1.14210406022002@news.mtwk.sps.mot.com>
References: <3C602717.27F3AA60@vernier.com>
User-Agent: MT-NewsWatcher/3.1 (PPC)
X-Face: )mY~XFHLw)UOW!W#[Ljvxq6Ja7(g'#F0-g*&puNxR8hEJkd@Oue/70^.)I78\
        (%a%&Id211u"l/t.llWo/M|?15XUlx9!IGkdWiEmcasiyg"k;Q9[~XuE+`t2"*n(>nmm
        @L/q,TjMd5+H{gASEPDR^$
X-Complaints-To: newsabuse@supernews.com
Lines: 49