cannot compile cpptrade on ubuntu 16.04
nirajrussspacetech opened this issue · 2 comments
Even after installing univalue I'm getting this error.
g++ -O2 -g -Wall -I/home/uss/Work/Trade_Server/libevhtp-develop/build/include -I/home/uss/Work/Trade_Server/libevhtp-develop/include -pthread -o obsrv srvapi.o obsrv.o Market.o Order.o HttpUtil.o libobcommon.a -levhtp -lunivalue -levent_core -levent_openssl -lssl -lcrypto -luuid
/usr/bin/x86_64-linux-gnu-ld: cannot find -lunivalue
There are no files getting installed in /usr directory of univalue
Kindly help
univalue error solved by applying --prefix=/usr/local while installing univalue
But now I'm not able to make cpptrade:
make all-am
make[1]: Entering directory '/home/uss/Work/Trade_Server/cpptrade-master'
g++ -O2 -g -Wall -I/home/uss/Work/Trade_Server/libevhtp-develop/build/include -I/home/uss/Work/Trade_Server/libevhtp-develop/include -I/home/uss/Work/Trade_Server/univalue-master/include -L/home/uss/Work/Trade_Server/univalue-master/lib -pthread -o obsrv srvapi.o obsrv.o Market.o Order.o HttpUtil.o libobcommon.a -levhtp -lunivalue -levent_core -levent_openssl -lssl -lcrypto -luuid
obsrv.o: In function reqInit(evhtp_request*, ReqState*, HttpApiEntry const*)': /home/uss/Work/Trade_Server/cpptrade-master/obsrv.cc:153: undefined reference to
evhtp_request_set_hook'
obsrv.o: In function upload_headers_cb(evhtp_request*, evhtp_kvs*, void*)': /home/uss/Work/Trade_Server/cpptrade-master/obsrv.cc:245: undefined reference to
evhtp_request_set_hook'
obsrv.o: In function main': /home/uss/Work/Trade_Server/cpptrade-master/obsrv.cc:405: undefined reference to
evhtp_callback_set_hook'
collect2: error: ld returned 1 exit status
Makefile:685: recipe for target 'obsrv' failed
make[1]: *** [obsrv] Error 1
make[1]: Leaving directory '/home/uss/Work/Trade_Server/cpptrade-master'
Makefile:577: recipe for target 'all' failed
make: *** [all] Error 2
Interestingly there is no mention of "evhtp_request_set_hook" in "/usr/include/evhtp/evhtp.h" file But when we download the libevhtp from git there is mention of "evhtp_request_set_hook" in "evhtp-develop/include/evhtp/evhtp.h"
Copying the downloaded evhtp.h file to /usr/local/include/evhtp/ folder also gives same error
Kindly help
Finally successfully installed.
Happy :)