User forums > Using Code::Blocks
What could be wrong with this library linking setting?
(1/1)
198710:
I tried to move my socket project from linux to windows,everything OK in linux,but it seems "-lwsock32" option never works on windows :(
How does C::B handle the order of the libraries?
[attachment deleted by admin]
Phenom:
Maybe you should add the library to the "Link libraries" section.
Just click add and type "wsock32".
Also turn on full command line logging and post the build log here.
198710:
Thanks!
I tried the command line way and find out that my library should be placed before wsock32,but I'm still wondering if there should be the chance to set the order of libraries manually inside C::B :?
MortenMacFly:
--- Quote from: 198710 on May 27, 2010, 10:08:19 am ---but I'm still wondering if there should be the chance to set the order of libraries manually inside C::B :?
--- End quote ---
Of course there is! Just re-order the libraries as needed in the build options of your project, tab "linker settings" -> "link libraries". That's what the up-and-down-buttons just right of this box are for. :-)
Oh - and don't forget to add wsock32 as library!!! Not an additional linker command. This will not work otherwise.
Navigation
[0] Message Index
Go to full version