Compile hiredis in C on Mac OS X
问题 I'm trying to compile a client using hiredis in C on Mac OS X . I've installed hiredis with: brew install hiredis But still get the error: fatal error: 'hiredis.h' file not found My hiredis.h is however in: /usr/local/include/hiredis/hiredis.c How do I tell the compiler this? I'm compiling with: gcc test.c -o test 回答1: In your question you said hiredis.h is in /usr/local/include/hiredis/hiredis.c , which doesn't really make any sense. Assuming you meant that your hiredis.h is in /usr/local