Author Topic: how to use static libs / how to use winsock.lib ?  (Read 8671 times)

Offline AlexisSorbas

  • Single posting newcomer
  • *
  • Posts: 8
  • alien
how to use static libs / how to use winsock.lib ?
« on: April 10, 2007, 02:54:20 pm »
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
The difference between genius and stupidity is that genius has its limits. - Albert Einstein

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: how to use static libs / how to use winsock.lib ?
« Reply #1 on: April 10, 2007, 03:04:13 pm »
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
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline AlexisSorbas

  • Single posting newcomer
  • *
  • Posts: 8
  • alien
Re: how to use static libs / how to use winsock.lib ?
« Reply #2 on: April 10, 2007, 04:05:33 pm »
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 ...
The difference between genius and stupidity is that genius has its limits. - Albert Einstein

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: how to use static libs / how to use winsock.lib ?
« Reply #3 on: April 10, 2007, 04:35:59 pm »
Perhaps do you know: Is there in the web some documentation on cross plattform programming where such questions are handled?
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.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)