Reputation: 521
I am trying to run Allegro on my mac but I keep getting
main.cpp:1:10: fatal error:'allegro5/allegro.h' file not found
error.
I have installed allegro successfully and I can find the header files in /usr/local/include/allegro5 . I added a path to my environment variable and when I do echo $PATH I can see /usr/local/include. In the sample program I am trying to run the include is like this -
#include <allegro5/allegro.h>
and I run-
make main
I can see the header files I have included, why isn't mac able to find the files present in that path?
Upvotes: 3
Views: 1659
Reputation: 6468
As @PaulR mentioned, PATH
is where the shell looks for commands, not for where the compiler looks for includes. You could also add the -I/usr/local/include
option to your command line as a way to resolve it.
You could check C_INCLUDE_PATH
or CPLUS_INCLUDE_PATH
or INCLUDE_PATH
(not sure which it's looking for).
Upvotes: 3