dermesser / libsocket

The ultimate socket library for C and C++, supporting TCP, UDP and Unix sockets (DGRAM and STREAM) on Linux, FreeBSD, Solaris. See also my uvco library for a refreshed version!
https://borgac.net/~lbo/doc/libsocket/
Other
799 stars 195 forks source link

Undefined reference / Cannot find symbols #17

Closed michelkaeser closed 10 years ago

michelkaeser commented 10 years ago

Hi there

I am trying to use the library (C version) in one of my projects but always get an error about missing symbols/references.

Do I have to do something special beside installing as stated in the README?

Tested on Debian 7 and Ubuntu 14.04 with g++, linking against libsocket.so.

Thanks for your help :)

michelkaeser commented 10 years ago

Ah OK already found it. I was using extern "C" statement but placed the include outside of it - putting it inside works as expected. Sorry =)

dermesser commented 10 years ago

Glad that you found the issue – I had that happen several times :)