Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - WinSock and dmc
Hi, I'm trying to compile my socket-using library with Digital Mars. The problem I ran into was that the winsock2.h and ws2_32.lib included with Digital Mars don't have a few things that are in Microsoft's WinSock (and in POSIX sockets) like getaddrinfo, sockaddr_storage, etc. I decided to try to use Microsoft's implementation with DM. I put the stuff from its headers I needed into the DM headers, and then I ran coff2omf on its socket library. Everything compiles, but when I try to link, it can't find definitions for getaddrinfo and freeaddrinfo. Here's what's weird... Those definitions are present in ws2_32.lib before I run coff2omf on it, and they're gone after. Check it out: $ grep freeaddrinfo ws2_32.lib Binary file ws2_32.lib matches $ /cygdrive/c/dm/bin/coff2omf.exe ws2_32.lib COFF2OMF: Converting '\\192.168.1.100\mike\wd\ws2_32.lib' $ grep freeaddrinfo ws2_32.lib And then no match. (Other symbols that were in there before are still there.) I don't know anything about these COFF and OMF formats so I don't know if this is surprising behavior to others or not. In any case, help on any level would be appreciated, whether it be explaining the behavior here or just telling me on a practical level how to get an up to date WinSock I can use with DM. Thanks, Mike Feb 23 2005
Mike Benfield wrote:Hi, I'm trying to compile my socket-using library with Digital Mars. The problem I ran into was that the winsock2.h and ws2_32.lib included with Digital Mars don't have a few things that are in Microsoft's WinSock (and in POSIX sockets) like getaddrinfo, sockaddr_storage, etc. I decided to try to use Microsoft's implementation with DM. I put the stuff from its headers I needed into the DM headers, and then I ran coff2omf on its socket library. Everything compiles, but when I try to link, it can't find definitions for getaddrinfo and freeaddrinfo. Here's what's weird... Those definitions are present in ws2_32.lib before I run coff2omf on it, and they're gone after. Check it out: $ grep freeaddrinfo ws2_32.lib Binary file ws2_32.lib matches $ /cygdrive/c/dm/bin/coff2omf.exe ws2_32.lib COFF2OMF: Converting '\\192.168.1.100\mike\wd\ws2_32.lib' Feb 23 2005
link /lib /convert ws2_32.lib comm2omf ws2_32.lib Feb 23 2005
Mike Benfield wrote:link /lib /convert ws2_32.lib comm2omf ws2_32.lib Feb 23 2005
|