Thread overview
the link error with compile examples
Jan 05, 2007
seagate
Jan 05, 2007
Chris
Jan 05, 2007
seagate
Jan 05, 2007
Chris Miller
January 05, 2007
I download the new version of dmd and dmc for www.digitalmars.com. but some examples in dmd report link errors.
such as:
dmd htmlget.d

d:\dm\bin\link.exe htmlget,,,user32+kernel32/noi;

OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _getprotobyname@4
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _getprotobynumber@4
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _getservbyname@8
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _getservbyport@8
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _WSAGetLastError@0
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _gethostbyname@4
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _gethostbyaddr@12
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _inet_addr@4
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _inet_ntoa@4
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _ioctlsocket@12
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _getsockopt@20
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _bind@12
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _connect@12
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _listen@8
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _accept@12
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _closesocket@4
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _shutdown@8
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _getpeername@12
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _getsockname@12
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _send@16
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _sendto@24
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _recv@16
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _recvfrom@24
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _setsockopt@20
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _socket@12
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _WSAStartup@8
d:\dmd\lib\phobos.lib(socket)
 Error 42: Symbol Undefined _WSACleanup@0
--- errorlevel 27

help!!!
January 05, 2007
Link with ws2_32.lib

> I download the new version of dmd and dmc for www.digitalmars.com. but some examples in dmd report link errors.
> such as:
> dmd htmlget.d
>
> d:\dm\bin\link.exe htmlget,,,user32+kernel32/noi;
>
> OPTLINK (R) for Win32  Release 7.50B1
> Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
>
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _getprotobyname@4
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _getprotobynumber@4
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _getservbyname@8
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _getservbyport@8
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _WSAGetLastError@0
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _gethostbyname@4
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _gethostbyaddr@12
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _inet_addr@4
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _inet_ntoa@4
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _ioctlsocket@12
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _getsockopt@20
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _bind@12
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _connect@12
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _listen@8
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _accept@12
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _closesocket@4
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _shutdown@8
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _getpeername@12
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _getsockname@12
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _send@16
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _sendto@24
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _recv@16
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _recvfrom@24
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _setsockopt@20
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _socket@12
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _WSAStartup@8
> d:\dmd\lib\phobos.lib(socket)
>  Error 42: Symbol Undefined _WSACleanup@0
> --- errorlevel 27
>
> help!!!

January 05, 2007
thank, It is ok!
but how can i know how to find the libs the code really wanted?
January 05, 2007
> but how can i know how to find the libs the code really wanted?

It's in the doc, http://www.digitalmars.com/d/phobos/std_socket.html