在Mac下編譯webdis

webdis爲Redis提供http接口。在mac上編譯的過程中遇到了一些問題,索性記錄下來。
1.下載webdis: git clone git://github.com/nicolasff/webdis.git
2.安裝libevent: brew install libevent-devel
3.修改Makefile,修改如下:
CFLAGS ?= -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -I/usr/local/Cellar/libevent/2.0.22/include
LDFLAGS ?= -levent -pthread -L/usr/local/Cellar/libevent/2.0.22/lib
4.最後編譯,執行make就可以了,留下一個警告“clang: warning: argument unused during compilation: ‘-pthread’“,不過不妨礙使用。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章