fpagliughi / sockpp

Modern C++ socket library.
BSD 3-Clause "New" or "Revised" License
782 stars 126 forks source link

I cannot get examples to compile on linux #35

Closed theisen1337 closed 4 years ago

theisen1337 commented 4 years ago

Using: g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 Examples: tcp echo client /server and unix echo client/server. I consistently get errors with non- static reference made to run_echo(). when I comment out the call to run_echo(); I get undefined references `sockpp::inet_address::inet_address(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned short)':|

fpagliughi commented 4 years ago

I'm using the same basic system and compiler for primary development, so we should be able to figure this out.

Which release or branch are you trying? Can you show your CMake command and the output, and then any other build commands up to the error.

fpagliughi commented 4 years ago

Any update on this, @theisen1337? Did you get it working?

theisen1337 commented 4 years ago

Yeah the issue: I was attempting to put the client server stuff into a object class to "unclutter the main function" which objects do not like threads. It was a whole thing, I tried stack overflow for some help https://stackoverflow.com/questions/58253963/how-do-i-go-about-not-having-network-multithreading-live-in-the-main-function

Instead I just ended up putting everything into the main function..

fpagliughi commented 4 years ago

OK. Good. I'll close this.