Please enable / Bitte aktiviere JavaScript!
Veuillez activer / Por favor activa el Javascript![ ? ]
Why can't you compile the example? - Q&A

Why can't you compile the example?

0 like 0 dislike
As an example
Just trying to connect to the server, the server itself is available. What am I doing wrong?

#include "libs/" int main(int argc, const char * argv[]) { sio::client h; h.connect(""); return 0; }

Undefined symbols for architecture x86_64:
"sio::client::connect(std::__1::basic_string, std::__1::allocator > const&)", referenced from:
_main in main.o
"sio::client::client()", referenced from:
_main in main.o
"sio::client::~client()", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
asked by | 50 views

1 Answer

0 like 0 dislike
The library is not connected - here and swears by the linker. How to treat - put in a place where the linker searches for libraries, sootvetstvuyushie Libu (socket io) and the correct version for your architecture.

Perhaps the library is, but it is necessary to change architecture, such as x86 only enable.
answered by
Welcome to Bug-code Q&A, where you can ask questions and receive answers from other members of the community.

24.8k questions

46.2k answers


13.3k users

24,788 questions
46,220 answers
13,321 users