binance-exchange / binacpp

Binance C++ library
MIT License
209 stars 108 forks source link

Making: ".so: file format not recognized; treating as linker script" #15

Closed wimmar closed 6 years ago

wimmar commented 6 years ago

I always get this error for libcurl and websockets.. I don't know much about compilers and linkers (tried a lot of different g++ commands but no avail, always stuck somewhere, also tried installing libcurl and websockets etc and not linking them locally) Help would be greatly appreciated :)

make example

Making example

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 \ -lcurl -ljsoncpp -lcrypto -lwebsockets -lbinacpp -o example /usr/bin/ld:../lib/libcurl-7.56.0/lib/libcurl.so: file format not recognized; treating as linker script /usr/bin/ld:../lib/libcurl-7.56.0/lib/libcurl.so:1: syntax error collect2: error: ld returned 1 exit status Makefile:25: recipe for target 'example' failed make: *** [example] Error 1

loogycheung commented 6 years ago

Hi sir, I also have this problem. I can compile successfully until I update ubuntu14.04 to 16.04 once, this problem happened..... How to solve it ! Oh god!

loogycheung commented 6 years ago

Haha , I find the reason. The zip document should be decompressed in terminal by using instruction "unzip binacpp-master.zip", then all documents will be linked. 1, Right click document to decompression; 2, update linux system; these two wrong way will cut the link which result to this problem. Closed !