User forums > Using Code::Blocks
how to use static libs / how to use winsock.lib ?
(1/1)
AlexisSorbas:
Dear community collegues,
I have a serious problem using C::B + MinGW:
How can I combine winsock.lib + libraries built with MingW (which have the extension .a)?
I guess, MinGW has a different way (from MSVC) to produce libraries.
But what should I do, if I want to use existing Microsoft DLLs?
:(
For sure Microsoft does not offer a static library winsock.a ...
Thank you for any hint!!!!
:)
Alex
TDragon:
Try libwsock32.a (in a C::B project's build options, just use "wsock32" in the Link Libraries). For Winsock2 functions, libws2_32.a.
Cheers,
JohnE / TDM
AlexisSorbas:
John,
thank you very much. You gave me exactly the right hint!!!
:D
Perhaps do you know: Is there in the web some documentation on cross plattform programming where such questions are handled? Could be useful to all forum audience ...
TDragon:
--- Quote from: AlexisSorbas on April 10, 2007, 04:05:33 pm ---Perhaps do you know: Is there in the web some documentation on cross plattform programming where such questions are handled?
--- End quote ---
Technically, this question isn't related to cross-platform programming; it is quite Windows-specific. Rather, this was one of the cases where MinGW's implementation of something differs from Microsoft's: a difference between compilers on one platform instead of a difference between platforms.
Such differences are generally explained in the MinGW documentation; the MinGWiki has a lot of good information.
Navigation
[0] Message Index
Go to full version