error: ‘evhtp_set_regex_cb’ was not declared in this scope
namanyayg opened this issue · 2 comments
g++ -DHAVE_CONFIG_H -I. -std=c++11 -pthread -I./vendor/liquibook/src -O2 -Wall -g -I/usr/local/include/evhtp -MT srvapi.o -MD -MP -MF .deps/srvapi.Tpo -c -o srvapi.o srvapi.cc
In file included from ./vendor/liquibook/src/book/order_book.h:12:0,
from ./vendor/liquibook/src/book/depth_order_book.h:6,
from Market.h:6,
from srvapi.cc:17:
./vendor/liquibook/src/book/comparable_price.h: In member function ‘bool liquibook::book::ComparablePrice::operator!=(liquibook::book::Price) const’:
./vendor/liquibook/src/book/comparable_price.h:89:21: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
return ! price_ == rhs;
^~
mv -f .deps/srvapi.Tpo .deps/srvapi.Po
g++ -DHAVE_CONFIG_H -I. -std=c++11 -pthread -I./vendor/liquibook/src -O2 -Wall -g -I/usr/local/include/evhtp -MT obsrv.o -MD -MP -MF .deps/obsrv.Tpo -c -o obsrv.o obsrv.cc
In file included from ./vendor/liquibook/src/book/order_book.h:12:0,
from ./vendor/liquibook/src/book/depth_order_book.h:6,
from Market.h:6,
from obsrv.cc:20:
./vendor/liquibook/src/book/comparable_price.h: In member function ‘bool liquibook::book::ComparablePrice::operator!=(liquibook::book::Price) const’:
./vendor/liquibook/src/book/comparable_price.h:89:21: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
return ! price_ == rhs;
^~
obsrv.cc: In function ‘int main(int, char**)’:
obsrv.cc:397:74: error: ‘evhtp_set_regex_cb’ was not declared in this scope
cb = evhtp_set_regex_cb(htp, apiEnt->path, apiEnt->cb, (void *) apiEnt);
^
Makefile:703: recipe for target 'obsrv.o' failed
make[1]: *** [obsrv.o] Error 1
make[1]: Leaving directory '/root/cpptrade'
Makefile:577: recipe for target 'all' failed
make: *** [all] Error 2
Happens during make
.
Dependencies/subdependencies installed:
- libevent2.1.8
- libevhtp
- oniguruma
- rocksdb
- univalue
- OpenSSL 1.0.2
What could be wrong?
I have the same error
alex@ubuntu:~/cpptrade$ make
make all-am
..........................
./vendor/liquibook/src/book/comparable_price.h:89:12: note: add parentheses around left hand side expression to silence this warning
return ! price_ == rhs;
^~~~~~~~
( )
obsrv.cc: In function ‘int main(int, char**)’:
obsrv.cc:397:9: error: ‘evhtp_set_regex_cb’ was not declared in this scope
cb = evhtp_set_regex_cb(htp, apiEnt->path, apiEnt->cb, (void *) apiEnt);
^~~~~~~~~~~~~~~~~~
obsrv.cc:397:9: note: suggested alternative: ‘evhtp_set_gencb’
cb = evhtp_set_regex_cb(htp, apiEnt->path, apiEnt->cb, (void *) apiEnt);
^~~~~~~~~~~~~~~~~~
evhtp_set_gencb
Makefile:703: recipe for target 'obsrv.o' failed
make[1]: *** [obsrv.o] Error 1
make[1]: Leaving directory '/home/alex/cpptrade'
Makefile:577: recipe for target 'all' failed
make: *** [all] Error 2
It seems need to install oniguruma before libevhtp, if not, it will define EVHTP_DISABLE_REGEX during we build libevhtp.
#ifndef EVHTP_DISABLE_REGEX EVHTP_EXPORT evhtp_callback_t * evhtp_set_regex_cb(evhtp_t * htp, const char * pattern, evhtp_callback_cb cb, void * arg); #endif