SFML community forums

Help => Network => Topic started by: Spellbreaker on September 22, 2010, 09:18:05 am

Title: [SOLVED] undefined reference to `socket@12'|
Post by: Spellbreaker on September 22, 2010, 09:18:05 am
Hi there!

I just downloaded SFML 2 SVN, built the libs, and when I want to compile my little network test, the following Error appears:

...undefined reference to `socket@12'|


and a bunch of other undefined references.

I am linking statically to system, network and wsock32, using mingw/gcc 4.5

Thanks in Advance.


Spellbreaker
Title: [SOLVED] undefined reference to `socket@12'|
Post by: Laurent on September 22, 2010, 09:38:42 am
You must link to ws2_32 instead of wsock32. You can also use the batch-build or CMake, both will integrate the external dependencies directly into the SFML static libraries.
Title: [SOLVED] undefined reference to `socket@12'|
Post by: Spellbreaker on September 22, 2010, 09:47:56 am
Ah okay.

I have problems with batch-build ( codeblocks ). Sometimes it simply hangs, so I compiled sfml using the codeblocks workspace. But now it works, thanks :)
Title: [SOLVED] undefined reference to `socket@12'|
Post by: Spellbreaker on September 22, 2010, 09:49:52 am
sorry, doesn't work with ws2_32 either :| Do I have to use a specific order for the libs?
Title: [SOLVED] undefined reference to `socket@12'|
Post by: Spellbreaker on September 22, 2010, 10:12:34 am
Seems to be a C::B problem, I inserted a "pause" after every code::blocks call, now it compiles without problems.

Don't know why....

Thanks again :)