General Mac OS X Discussion General Apple and Mac OS X Discussion

Thread Tools Display Modes
  (#1) Old
sabisun sabisun is offline
Junior Member
Posts: 6
Join Date: Jul 2009
Question Can not include math.h - 08-07-2009, 09:48 AM

Dear All:

When I try to use some math functions i.e. sqrt...etc, I counld not include math.h header file.
I got "no such file or directory" error.
#include <math.h> and "math.h" all get the same error message.

Here I am not sure whether I need to add some framework in project.
Or it may because I'm writing driver (kext) not application.
Does anyone know how to solve this?
Thanks in advanced.
Reply With Quote
  (#2) Old
meklort meklort is offline
meklort's Avatar
Posts: 1,353
Join Date: Feb 2009
Location: Colorado, USA
Send a message via AIM to meklort Send a message via MSN to meklort Send a message via Yahoo to meklort
Default 08-07-2009, 03:13 PM

math.h isn't supported in iokit / kernel extensions. You can use functions provided by the kernel, although I don't know what they are, or you can do the math in userspace.

Dell Mini 9 | Mac OS X 10.6.5 | 2 GB RAM | 32 GB Buffalo SSD | BIOS A05
Dell Mini 10v | Mac OS X 10.6.5 | 1 GB RAM | 160 GB HDD | BIOS A06
My Blog | NetbookInstaller code repository | NetbookInstaller Website | Want a invite? message me.
Reply With Quote

« EXTERNAL VGA - Mirroring display on 40" LCD Toshiba HDTV!!! | boot0: error »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Copyright © 2008-2016