Thread overview
socket lib file
Jul 02, 2002
john.mcloughlin
Jul 03, 2002
Walter
Jul 08, 2002
john.mcloughlin
July 02, 2002
Hello,
I am trying to write a simple socket program.
I am new to DMC.
In MS IDE I used to add wsock32.lib in the project settings.
From what I can gather in DM I need to have a lib file to import fn calls from
winsock.dll (I found this on my 2000 machine).
I wrote this lib file in Notepad (maybe naive!!) and tried:
link /implib winsock.lib c:\winnt\system32\winsock.dll
I got corruption error 138 - I think the format or something is wrong.
Any help is appreciated.
Thanks...

LIBRARY winsock
EXETYPE NT
SUBSYSTEM CONSOLE

EXPORTS
_WSAStartup@8                 = WSAStartup                          ;
WSAStartup
_connect@12                   = connect                             ;
connect
_htons@4                      = htons                               ;
htons
_inet_addr@4                  = _inet_addr                          ;
inet_addr
_socket@12                    = socket                              ;
socket
_WSACleanup@0                 = WSACleanup                          ;
WSACleanup


July 03, 2002
Use implib to create .lib files from .def files, not the linker. -Walter

<john.mcloughlin@rocketmail.com> wrote in message news:afsm0b$2ebb$1@digitaldaemon.com...
> Hello,
> I am trying to write a simple socket program.
> I am new to DMC.
> In MS IDE I used to add wsock32.lib in the project settings.
> From what I can gather in DM I need to have a lib file to import fn calls
from
> winsock.dll (I found this on my 2000 machine).
> I wrote this lib file in Notepad (maybe naive!!) and tried:
> link /implib winsock.lib c:\winnt\system32\winsock.dll
> I got corruption error 138 - I think the format or something is wrong.
> Any help is appreciated.
> Thanks...
>
> LIBRARY winsock
> EXETYPE NT
> SUBSYSTEM CONSOLE
>
> EXPORTS
> _WSAStartup@8                 = WSAStartup                          ;
> WSAStartup
> _connect@12                   = connect                             ;
> connect
> _htons@4                      = htons                               ;
> htons
> _inet_addr@4                  = _inet_addr                          ;
> inet_addr
> _socket@12                    = socket                              ;
> socket
> _WSACleanup@0                 = WSACleanup                          ;
> WSACleanup
>
>


July 08, 2002
Thanks...
I heard about this implib.exe, I guess its on the CD?
I couldn't find it in the download I got.
Maybe I looked in the wrong place.
John

In article <aftukn$mtf$1@digitaldaemon.com>, Walter says...
>
>Use implib to create .lib files from .def files, not the linker. -Walter
>
><john.mcloughlin@rocketmail.com> wrote in message news:afsm0b$2ebb$1@digitaldaemon.com...
>> Hello,
>> I am trying to write a simple socket program.
>> I am new to DMC.
>> In MS IDE I used to add wsock32.lib in the project settings.
>> From what I can gather in DM I need to have a lib file to import fn calls
>from
>> winsock.dll (I found this on my 2000 machine).
>> I wrote this lib file in Notepad (maybe naive!!) and tried:
>> link /implib winsock.lib c:\winnt\system32\winsock.dll
>> I got corruption error 138 - I think the format or something is wrong.
>> Any help is appreciated.
>> Thanks...
>>
>> LIBRARY winsock
>> EXETYPE NT
>> SUBSYSTEM CONSOLE
>>
>> EXPORTS
>> _WSAStartup@8                 = WSAStartup                          ;
>> WSAStartup
>> _connect@12                   = connect                             ;
>> connect
>> _htons@4                      = htons                               ;
>> htons
>> _inet_addr@4                  = _inet_addr                          ;
>> inet_addr
>> _socket@12                    = socket                              ;
>> socket
>> _WSACleanup@0                 = WSACleanup                          ;
>> WSACleanup
>>
>>
>
>