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

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

Closed
wimmar opened this issue Jan 16, 2018 · 2 comments
Closed

Comments

@wimmar
Copy link

wimmar commented Jan 16, 2018

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
Copy link

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
Copy link

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 !

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

3 participants