FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Trouble compiling listener.d in /dmd/samples/d/listener.d

 
Post new topic   Reply to topic     Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
placson



Joined: 30 Oct 2004
Posts: 4
Location: san mateo, ca

PostPosted: Sat Oct 30, 2004 5:35 pm    Post subject: Trouble compiling listener.d in /dmd/samples/d/listener.d Reply with quote

I'm on winxp and i just downloaded the d win32 compiler. my compiler seems to not find the import for sockets:

D:\dmd\samples\d>dmd listener.d
d:\dmd\bin\..\..\dm\bin\link.exe listener,,,user32+kernel32/noi;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved

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

What am I missing here?

Thanks for your help,
Patrick
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sat Oct 30, 2004 6:17 pm    Post subject: Reply with quote

You need to tack wsock32.lib onto the tail of the DMD command line, along with whatever other libraries you may be using.

You might also take a look at mango.io & mango.http, since they may have what you need (Mango has Socket wrappers, listeners, HTTP server, HTTP client, etc ...)

Good luck!
Back to top
View user's profile Send private message
placson



Joined: 30 Oct 2004
Posts: 4
Location: san mateo, ca

PostPosted: Sun Oct 31, 2004 4:48 pm    Post subject: wsock32.lib! Reply with quote

adding wsock32.lib as you suggest worked!

thanks for the help!

-patrick
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Tutorials All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group