Closed leogi22 closed 6 years ago
Try this? sudo apt-get install libssl-dev
Yes this took care of the -lcrypto problem Looks like make is not finding -ljsoncpp Following an advice to other earlier issue, I removed it but then the following json related error comes up: undefined reference to json::value::astring come up
Seems that I need to get a jsoncpp.o library right?
Well, now that I am using the jsoncpp library, I am running into the fact that BinaCPP::init isn't referenced:
g++ -I../lib/libcurl-7.56.0/include -I../lib/jsoncpp-1.8.3/include -I../lib/libwebsockets-2.4.0/include -I../lib/libbinacpp/include \ example.cpp \ -L../lib/libcurl-7.56.0/lib \ -L../lib/libwebsockets-2.4.0/lib \ -L../lib/libbinacpp/lib \ -L../lib/jsoncpp-1.8.3/lib \ -lcurl -ljsoncpp -lcrypto -lwebsockets -lbinacpp -o example
LEADS TO:
example.cpp:231:16: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
printf(KRED"Order Failed! Reason: %s\n"RESET, reason.c_str() );
^
example.cpp:233:15: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
printf(KGRN"\n\n%s %s %s %s(%s) %s %s\n\n"RESET, symbol.c_str() , side.c_str() , orderType.c_str() , orderId.c_str() , orderStatus.c_str(), price.c_str(), qty.c_str() );
^
example.cpp:236:14: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
printf(KBLU"\n\n%s %s %s %s %s\n\n"RESET, symbol.c_str() , side.c_str() , executionType.c_str() , orderType.c_str() , orderId.c_str() );
^
/tmp/ccIDjjuK.o: In function main': example.cpp:(.text+0x22c4): undefined reference to
BinaCPP::init(std::cxx11::basic_string<char, std::char_traits
libbinacpp.so is included as well as the include file binacpp.h -- I got errors of missing file or unfound library when experimentally renaming and running make example
I am not sure the BinaCPP::init is not found: I expect it to be in the libbinaCPP.so library I'm linking against. Could you shed some light Please?
I got the project to build using QT creator and adding the cpp files that were needed (including binaCPP.cpp). FYI
I'm not able to solve this issue, can you help me with this?
Hi the example provided runs fine however, when trying to make it from the makefile provide, I get this error: openssl/ssl.h not found
I installed ssl band added these lines in the makefile:
libssl_dir=../../openssl-1.0.0t libssl_include=${libssl_dir}/include libssl_lib=${libssl_dir}/lib
and -I$(libssl_include) as well as -L$(libssl_lib) \
but then I get -lcrypto not found
Any idea on how I can rebuild the example properly?