iDevGames Forums
error: malloc.h: No such file or directory - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: error: malloc.h: No such file or directory (/thread-3429.html)



error: malloc.h: No such file or directory - tehqin - Mar 11, 2007 12:34 AM

error: malloc.h: No such file or directory

i tryed to #include <malloc.h> in order to use malloc to create a pseudo array. does xcode even have this library? can i dl it somewhere and use it? or does malloc.h a different name in xcode?


error: malloc.h: No such file or directory - tehqin - Mar 11, 2007 12:38 AM

nvm i found out that malloc was placed inside stdlib.h Smile oh well. forgetting to go to google first = my moment of stupid. Rasp


error: malloc.h: No such file or directory - mac_girl - Mar 11, 2007 03:03 AM

I did this in one of my projects I'm working on and it works.

#ifdef __WXMAC__
#include "sys/malloc.h" // mac os x
#else
#include "malloc.h" // linux, windows
#endif

If you don't use wxWidgets maybe change WXMAC to just MAC?
( I program for mac/linux/windows so I care not only about just for mac. )