SFML community forums
Help => General => Topic started by: Qwdfg on March 19, 2018, 09:53:14 pm
-
Following https://www.sfml-dev.org/tutorials/2.4/compile-with-cmake.php (https://www.sfml-dev.org/tutorials/2.4/compile-with-cmake.php)
Path = C:\Program Files (x86)\CodeBlocks\MinGW\bin
Cmake config:
https://imgur.com/a/vSyiR (https://imgur.com/a/vSyiR)
https://imgur.com/a/t8Gmy (https://imgur.com/a/t8Gmy)
Some strange mistake appeared, but the libraries are compiled:
https://imgur.com/a/zIaXM (https://imgur.com/a/zIaXM)
Try to compile program:
https://imgur.com/a/wtfmN (https://imgur.com/a/wtfmN)
And got an error:
https://imgur.com/a/TUquh (https://imgur.com/a/TUquh)
What have I done wrong ?
-
You didn't link ws2_32 as mentioned in the tutorial.
-
You didn't link ws2_32 as mentioned in the tutorial.
I don't find any mentioned in the tutorial about linking ws2_32.I tried to compile sf::RenderWindow, but:
https://imgur.com/a/VslIB (https://imgur.com/a/VslIB)
I can't understand where my error :'(
-
Check the Code::Blocks tutorial: https://www.sfml-dev.org/tutorials/2.4/start-cb.php
-
Check the Code::Blocks tutorial: https://www.sfml-dev.org/tutorials/2.4/start-cb.php
I read it. Additionally, because Code::Blocks makes use of GCC, the linking order does matter. This means that libraries that depend on other libraries have to be added to the library list before the libraries they depend on
My linker settings:
https://imgur.com/a/RjDvA (https://imgur.com/a/RjDvA)
sfml-system has dependency winmm
sfml-network has dependency ws2_32 and sfml-system
But it does not work :(
-
As mentioned in the tutorial, link order matters. You've put ws2_32 before the sfml-network module, but sfml-network depends on ws2_32, thus it must come first.
-
As mentioned in the tutorial, link order matters. You've put ws2_32 before the sfml-network module, but sfml-network depends on ws2_32, thus it must come first.
It looks like i misunderstood tutorial. All works fine ! Thank you ;)