I'm trying to install libsndfile on OSX, and I used homebrew (brew install libsndfile). But when I try to compile some example code with #include <sndfile.h>
using gcc it says sndfile.h cannot be found, but when I check in /usr/local/include
it's right there. Is there something I'm missing?
Asked
Active
Viewed 1,733 times
0

Zeeshan Pirzada
- 130
- 1
- 1
- 7
1 Answers
1
Depending on which compiler you're using you may need to add:
-I/usr/local/include
to you your command line, e.g.
gcc -Wall -I/usr/local/include foo.c -o foo

Paul R
- 208,748
- 37
- 389
- 560
-
Can you clarify? Where do I add that? – Zeeshan Pirzada Mar 29 '15 at 07:13
-
It depends - are you using a makefile, an Xcode project, or just compiling from the command line ? – Paul R Mar 29 '15 at 07:15