A couple of tweaks to make some code run

To fix this error:

error: malloc.h: No such file or directory

osx does not support malloc.h, instead use stdlib.h. I did this by replacing #include <malloc.h> in all the .c files with:

#if !defined(__APPLE__)
#include <malloc.h>
#else
#include <stdlib.h>
#endif

Missing libraries:
error: sndfile.h: No such file or directory

I installed this library using macports:
sudo port install libsndfile

And then added the paths to macports libraries to the Makefile:

INCLUDE = -I/opt/local/include
LIBRARY  = -L/opt/local/lib

Leave a Reply

Your email address will not be published.