Menu

Dev C++ internet programming

ben
2007-12-06
2012-09-26
  • ben

    ben - 2007-12-06

    I was just wondering if anyone knew whether Dev C++ supports Winsock programming. Can I link to wsock32.lib from Dev C++? I suppose that this actually has to do with Mingw

     
    • Anonymous

      Anonymous - 2007-12-06

      In MinGW the convention for library names is libXXX.a, so the correct library is libwsock32.a. Libraries in folders defined by -L<path> linker options can be linked with the option -lXXX (so -lwsock32 for example), the lib prefix and .a extension are assumed. c:\dev-cpp\lib (where libwsock32.a lives) is a default library path in the standard installation.

      libws2_32.a (nemtioned by Osito) is the correct library for Windows Sockets version 2. This is a superset of wsock32 (Windows Sockets version 1) so you should probably use the newer library. You can use either.

      It is as you suggest a MinGW issue, you can always look at www.mingw.org (and that is a good place to get the latest Win32 API files - although you can use WebUpdate also, but they may not be the 'latest'). You might also have looked in the Dev-C++ include and lib directories, the presence of the relevant header and library files is a big give-away to te answer to your question.

      Clifford

       
    • Osito

      Osito - 2007-12-06

      I have done Winsock stuff with Dev. My linker line is -lws2_32 though, so that's not the same lib you're using.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.