Thread overview | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
January 14, 2007 listener.d | ||||
---|---|---|---|---|
| ||||
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 |
January 14, 2007 Re: listener.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to nobody_ | nobody_ wrote:
> I think I did something wrong :)
> D 1.0
>
Link with ws2_32.lib
|
January 14, 2007 Re: listener.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to nobody_ | 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.
|
January 14, 2007 Re: listener.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to nobody_ | Thanks. Wouldn't it be handy if that would be noticed in the sourcefile, or am I just too new :) |
January 14, 2007 Re: listener.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to nobody_ | 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. |
January 14, 2007 Re: listener.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frits van Bommel | 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 :) |
January 15, 2007 Re: listener.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to nobody_ | 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 :).
|
January 15, 2007 Re: listener.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to nobody_ | 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 |
Copyright © 1999-2021 by the D Language Foundation