Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling binacpp in mac os x sierra #15

Open
0x75 opened this issue Dec 27, 2019 · 0 comments
Open

compiling binacpp in mac os x sierra #15

0x75 opened this issue Dec 27, 2019 · 0 comments

Comments

@0x75
Copy link

0x75 commented Dec 27, 2019

Hi,

first of all thanks for the work of writing binacpp. It would make my life easier
if i could get it to link.
I have no idea what i am doing wrong, maybe you can help.

I installed websockets, jsoncpp, curl via homebrew.
jsoncpp does not work with clang, so i installed gcc.
compiled the binacpp sources with -c and build static lib binacpp.a with ar rcs *.o
then applied following command to compile a test program which does nothing
but get the server time.

/usr/local/opt/gcc/bin/c++-9 test.cpp binacpp.a -I/usr/local/Cellar/[email protected]/1.1.1d/include -I/usr/local/Cellar/jsoncpp/1.9.1/include/ -L/usr/local/Cellar/jsoncpp/1.9.1/lib/ -L/usr/local/Cellar/[email protected]/1.1.1d/lib -lcrypto -lwebsockets -lcurl -ljsoncpp

i get following errors:

Undefined symbols for architecture x86_64:
"Json::Reader::parse(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, Json::Value&, bool)", referenced from:
BinaCPP::get_exchangeInfo(Json::Value&) in binacpp.a(binacpp.o)
BinaCPP::get_serverTime(Json::Value&) in binacpp.a(binacpp.o)
BinaCPP::get_allPrices(Json::Value&) in binacpp.a(binacpp.o)
BinaCPP::get_allBookTickers(Json::Value&) in binacpp.a(binacpp.o)
BinaCPP::get_depth(char const*, int, Json::Value&) in binacpp.a(binacpp.o)
BinaCPP::get_aggTrades(char const*, int, long, long, int, Json::Value&) in binacpp.a(binacpp.o)
BinaCPP::get_24hr(char const*, Json::Value&) in binacpp.a(binacpp.o)
...
"Json::operator<<(std::basic_ostream<char, std::char_traits >&, Json::Value const&)", referenced from:
_main in ccgWRiMj.o
"Json::Value::asStringabi:cxx11 const", referenced from:
BinaCPP::get_price(char const*) in binacpp.a(binacpp.o)
BinaCPP::get_bookTicker(char const*, Json::Value&) in binacpp.a(binacpp.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

compiled jsoncpp amagalmated source from binacpp and got even more unresolved symbol errors....

All this Json::... Stuff should be referencable by including jsoncpp. have no idea whats going wrong.

Any help appreciated.
regards,
Nico

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant