Formular una preguntaFormular una pregunta
 

RespondidaHow to link WS2_32.lib?

  • jueves, 20 de julio de 2006 15:45DrScheme Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

    Hello people,

    could anyone please tell me, how to link that library WS2_32.lib?

    I try to learn about windows sockets, but I get the LNK2019-Error. I know that I need the library but I don't know how to tell the linker the path to the lib!

    Thanks in advance

Respuestas

  • jueves, 20 de julio de 2006 17:10Ted_ Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     Respondida

    Are you talking about Visual C++ 2005? Then the necessary library files will already be installed on your machine and you simply need to specify ws2_32.lib as a library in

    Configuration properties - Linker - Input - Additional Dependencies.

Todas las respuestas

  • jueves, 20 de julio de 2006 17:10Ted_ Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     Respondida

    Are you talking about Visual C++ 2005? Then the necessary library files will already be installed on your machine and you simply need to specify ws2_32.lib as a library in

    Configuration properties - Linker - Input - Additional Dependencies.

  • jueves, 13 de diciembre de 2007 17:21anc3s Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

    To link from dos command prompt like me just add the option swith "/link C:\MyVisualStudio\VCxx\Lib\WS2_32.LIB" . There are no macro function like /MD which is used for linking MSVCRT.LIB so you have type it out with your location path. Type CL /? for further help.

    Hope this helps...

  • jueves, 13 de diciembre de 2007 17:27Pintu Shukla Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    You also can use in the Following way.
    #pragma comment(lib, "ws2_32.lib")

    Thanx