Hi,
almost got it compiled on osx 10.13.6.
- osx does not have HOST_NAME_MAX in limits.h (dont know where it is, just set it to 512 locally)
- osx does not have a pthread_self() that returns int (it returns a struct) (binance_websocket.cpp line 63). This can be fixed using this code snippet in the same place:
uint64_t tid;
pthread_threadid_np(NULL, &tid);
return tid;
then code compiles. There seems to be a problem with jsoncpp though. cause the last stepp in compiling libbinacpp.so gives me this error:
/usr/local/Cellar/gcc/9.2.0_2/bin/g++-9 -fPIC -shared -lcurl -lwebsockets -ljsoncpp binance.cpp *.o -o libbinacpp.so -lcrypto -L /usr/local/Cellar/[email protected]/1.1.1d/lib/ -L/usr/local/lib -ljsoncp
"Json::Reader::parse(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, Json::Value&, bool)", referenced from:
binance::Account::getInfo(Json::Value&, long) in binance_account.o
binance::Account::getTrades(Json::Value&, char const*, int) in binance_account.o
binance::Account::getTradesSigned(Json::Value&, char const*, long, long, int) in binance_account.o
binance::Account::getHistoricalTrades(Json::Value&, char const*, long, int) in binance_account.o
binance::Account::getOpenOrders(Json::Value&, long) in binance_account.o
binance::Account::getOpenOrders(Json::Value&, char const*, long) in binance_account.o
binance::Account::getAllOrders(Json::Value&, char const*, long, int, long) in binance_account.o
...
"Json::Value::getMemberNamesabi:cxx11 const", referenced from:
binance::Account::getInfo(Json::Value&, long) in binance_account.o
binance::Account::getTrades(Json::Value&, char const*, int) in binance_account.o
binance::Account::getTradesSigned(Json::Value&, char const*, long, long, int) in binance_account.o
binance::Account::getHistoricalTrades(Json::Value&, char const*, long, int) in binance_account.o
binance::Account::getOpenOrders(Json::Value&, long) in binance_account.o
binance::Account::getOpenOrders(Json::Value&, char const*, long) in binance_account.o
binance::Account::getAllOrders(Json::Value&, char const*, long, int, long) in binance_account.o
...
"Json::Value::asStringabi:cxx11 const", referenced from:
binance::Account::getInfo(Json::Value&, long) in binance_account.o
binance::Account::getTrades(Json::Value&, char const*, int) in binance_account.o
binance::Account::getTradesSigned(Json::Value&, char const*, long, long, int) in binance_account.o
binance::Account::getHistoricalTrades(Json::Value&, char const*, long, int) in binance_account.o
binance::Account::getOpenOrders(Json::Value&, long) in binance_account.o
binance::Account::getOpenOrders(Json::Value&, char const*, long) in binance_account.o
binance::Account::getAllOrders(Json::Value&, char const*, long, int, long) in binance_account.o
...
if i remove -ljsoncpp there are tons of errors, so it clearly finds jsoncpp. I have no idea what the issue is. Any help appreciated.
(compiles fine on linux ! thanks for the effort)