RE: kext - calling ctl_register - from cpp - Undefined symbols
RE: kext - calling ctl_register - from cpp - Undefined symbols
- Subject: RE: kext - calling ctl_register - from cpp - Undefined symbols
- From: "Erez Kaplan" <email@hidden>
- Date: Thu, 31 May 2007 08:33:31 +0200
- Thread-topic: kext - calling ctl_register - from cpp - Undefined symbols
Title: RE: kext - calling ctl_register - from cpp - Undefined symbols
Thanks guys, it now works like a charm.
-----Original Message-----
From: Josh Graessley [mailto:email@hidden]
Sent: Wed 5/30/2007 5:06 PM
To: Erez Kaplan
Cc: email@hidden
Subject: Re: kext - calling ctl_register - from cpp - Undefined symbols
You need to wrap the kpi headers in extern "C". This should be done in
the headers themselves, but it isn't.
-josh
On May 30, 2007, at 1:47 AM, Erez Kaplan <email@hidden> wrote:
>
> Hi,
>
> 10.4.9
>
> I have adapted the tcplognke sample to my needs and it works file
> All the sources are c.
>
> I needed to change one source from c to cpp and a strange phenomena
> occurred.
>
> ================
>
> kld(): Undefined symbols:
> __Z12ctl_registerP12kern_ctl_regPPv
> __Z14ctl_deregisterPv
> kextload: kld_load_from_memory() failed for module /tmp/
> tcplognke.kext/Contents/MacOS/tcplognke
> kextload: a link/load error occured for kernel extension /tmp/tcplognke.kext/
> load failed for extension /tmp/tcplognke.kext/
>
> ==================
>
>
> Can I not call ctl_register from a C++ source?
>
> Thanks, Erez
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden