digitalmars.D.learn - listener.d
- nobody_ (63/63) Jan 14 2007 I think I did something wrong :)
- Mike Parker (2/5) Jan 14 2007 Link with ws2_32.lib
- Frits van Bommel (6/19) Jan 14 2007 [snip more missing winsock symbols]
- nobody_ (3/3) Jan 14 2007 Thanks.
- Frits van Bommel (10/13) Jan 14 2007 If you're using std.socket, it's noted right at the top of the
- nobody_ (3/3) Jan 14 2007 listener.d is an example supplied with D.
- Frits van Bommel (2/5) Jan 14 2007 Ah well I never looked much at the samples :).
- nobody_ (65/65) Jan 15 2007 I thought it would just work... but:
I think I did something wrong :) D 1.0 Command >>> Building Project: windows...... C:\D\dm\bin\bud_win_3.04.exe listener.d -d -full -DCPATHC:\D\dmd\bin -Twindows.exe -odobjs OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getprotobyname 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getprotobynumber 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getservbyname 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getservbyport 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _WSAGetLastError 0 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _gethostbyname 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _gethostbyaddr 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _inet_addr 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _inet_ntoa 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _ioctlsocket 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getsockopt 20 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _bind 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _connect 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _listen 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _accept 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _closesocket 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _shutdown 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getpeername 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getsockname 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _send 16 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _sendto 24 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _recv 16 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _recvfrom 24 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _setsockopt 20 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _select 20 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _socket 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _WSAStartup 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _WSACleanup 0
Jan 14 2007
nobody_ wrote:I think I did something wrong :) D 1.0Link with ws2_32.lib
Jan 14 2007
nobody_ wrote:I think I did something wrong :) D 1.0 Command >>> Building Project: windows...... C:\D\dm\bin\bud_win_3.04.exe listener.d -d -full -DCPATHC:\D\dmd\bin -Twindows.exe -odobjs OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getprotobyname 4[snip more missing winsock symbols] To use winsock functions you need to link to a special library. IIRC it's ws2_32.lib. Try adding it to the command line, or (since you're using bud) adding 'version(build) { pragma(link, ws2_32); }' in a source file.
Jan 14 2007
Thanks. Wouldn't it be handy if that would be noticed in the sourcefile, or am I just too new :)
Jan 14 2007
nobody_ wrote:Thanks. Wouldn't it be handy if that would be noticed in the sourcefile, or am I just too new :)If you're using std.socket, it's noted right at the top of the documentation[1]: "Notes: For Win32 systems, link with ws2_32.lib." Since that documentation is generated from the source file, it's in there too. In fact, it's in the first comment after the license at the top. If you're using something else (raw Win32 headers, Mango, whatever) please tell us which so whoever maintains 'the sourcefile' can put a note there as well ;). [1]: http://www.digitalmars.com/d/phobos/std_socket.html, or dmd/html/d/phobos/std_socket.html in your DMD installation.
Jan 14 2007
listener.d is an example supplied with D. There is no notice there, but you are totally right that I should have been able to find out about that notice on my own :)
Jan 14 2007
nobody_ wrote:listener.d is an example supplied with D. There is no notice there, but you are totally right that I should have been able to find out about that notice on my own :)Ah well I never looked much at the samples :).
Jan 14 2007
I thought it would just work... but: What did I do wrong this ime? Command >>> ReBuilding Project: windows...... C:\D\dm\bin\bud_win_3.04.exe listener.d -d -w -full -DCPATHC:\D\dmd\bin -Twindows.exe C:\D\dmd\lib\WS2_32.LIB -odobjs OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getprotobyname 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getprotobynumber 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getservbyname 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getservbyport 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _WSAGetLastError 0 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _gethostbyname 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _gethostbyaddr 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _inet_addr 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _inet_ntoa 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _ioctlsocket 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getsockopt 20 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _bind 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _connect 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _listen 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _accept 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _closesocket 4 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _shutdown 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getpeername 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _getsockname 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _send 16 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _sendto 24 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _recv 16 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _recvfrom 24 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _setsockopt 20 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _select 20 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _socket 12 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _WSAStartup 8 C:\D\dmd\lib\phobos.lib(socket) Error 42: Symbol Undefined _WSACleanup 0 Finished
Jan 15 2007