malloc.h not found on Mac OS X

10,644 views
Skip to first unread message

Dirk Haun

unread,
Sep 16, 2008, 5:08:34 AM9/16/08
to Cmockery
To get it to compile on Mac OS X 10.5.5 with gcc 4.2.1, I had to tell
it where to find the malloc.h header file:

export CFLAGS=-I/usr/include/malloc
./configure

Hope that helps someone ...

Seereen Noorwali

unread,
Jun 15, 2012, 2:21:07 AM6/15/12
to cmoc...@googlegroups.com
hi 
can you add more information about this issue ...please 
I am working om Mac 10.6.8 and xcode 3.2.3 and gcc 4.2.1 ....
I get this problem when I am trying to compile some code 
"error: malloc.h: No such file or directory"
the problem is .... I do not know how to use export and what is this command mean !!! 
I tried to type export CFLAGS=-I/usr/include/malloc  in the terminal and I got nothing and the erorr still there !!! 
could you please give me suggestions or advise :D 
thanks 
Seereen 

Thiago Pereira Rosa

unread,
Sep 30, 2012, 3:44:05 PM9/30/12
to cmoc...@googlegroups.com
Hi.
The lib malloc.h is in directory "malloc" on OSx (Lion, Mountain Lion):
 /usr/include/malloc

You can do:
 cd /usr/include/malloc
 cp malloc.h ..

And done...
Thiago.
Reply all
Reply to author
Forward
0 new messages