www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - the link error with compile examples

reply seagate <xiao_ao_jiang_hu hotmail.com> writes:
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!!!
Jan 04 2007
parent reply Chris <chris dprogramming.com> writes:
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!!!

Jan 04 2007
parent reply seagate <xiao_ao_jiang_hu Hotmail.com> writes:
thank, It is ok!
but how can i know how to find the libs the code really wanted?
Jan 04 2007
parent "Chris Miller" <chris dprogramming.com> writes:
 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
Jan 04 2007