webdis
webdis copied to clipboard
Build fail in Mac 10.9.3
./server.h:4:10: fatal error: 'event.h' file not found
include <event.h>
I have installed libevent 2.2 using brew but still getting the same issue.
I am also getting this error in Ubuntu 14.04. Installed build tools with build-essential.
Hi, check out https://github.com/nicolasff/webdis/issues/45
I was also having this problem in Ubuntu 14.04 until I installed libevent.
@PrithivirajDamodaran
It is because homebrew
installs the packages in a different directory (/usr/local/Cellar
).
So, what you have to do is to link the header files before running make
:
export CFLAGS="-I /usr/local/Cellar/libevent/2.0.22/include"
make
Note: I have libevent 2.0.22 installed, change the path if you have a different version. @keithhamilton Do the same thing, just change the path to where the libevent is installed.
@breda - Your solution resulted in the following error. Do you know where the package is installed when installed with apt-get
? I'm thinking a symlink or something might solve the problem, but don't know the where the package is normally located when not in usr/local/Cellar
. Any ideas?
In file included from webdis.c:1:
./server.h:5:10: error: 'hiredis/async.h' file not found with <angled> include;
use "quotes" instead
#include <hiredis/async.h>
^~~~~~~~~~~~~~~~~
"hiredis/async.h"
1 error generated.
make: *** [webdis.o] Error 1
I'm having the same issue after running the export
cc -c -I /usr/local/Cellar/libevent/2.0.21_1/include -o webdis.o webdis.c
In file included from webdis.c:1:
./server.h:5:10: error: 'hiredis/async.h' file not found with <angled> include;
use "quotes" instead
#include <hiredis/async.h>
^~~~~~~~~~~~~~~~~
For anyone still interested, I helped a friend fix this issue by updating XCode's command line utilities.