Cannot build ws2_32.lib
Regan Heath
regan at netmail.co.nz
Thu Aug 2 10:31:49 PDT 2012
On Thu, 02 Aug 2012 16:59:32 +0100, Andre Tampubolon <andre at lc.vlsm.org>
wrote:
> I found this code from this page:
> http://rosettacode.org/wiki/Category:D
>
> import std.stdio, std.socket;
>
> void main(){
> writefln("%s", Socket.hostName());
> }
>
> When I tried to build it (I'm on Windows, anyway), I got this:
> C:\Users\CSL-NB-064\Codes\D>dmd hostname.d
> OPTLINK (R) for Win32 Release 8.00.5
> Copyright (C) Digital Mars 1989-2009 All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> ws2_32.lib
> Warning 2: File Not Found ws2_32.lib
> C:\dmd\lib\phobos.lib(socket)
> Error 42: Symbol Undefined _WSAIoctl at 36
> --- errorlevel 1
Works for me :P
Have you downloaded and extracted a normal dmd 2.0 installation/zip?
If so, you should have:
<some path>\dmd2\windows\lib\ws2_32.lib
and your
<some path>\dmd2\windows\bin\sc.ini
should have something like:
LIB="%@P%\..\lib";\dm\lib
which will point dmd at that ws2_32.lib file.
If you have those libs, and sc.ini, then perhaps all you're missing is the
correct PATH setting, I have
<some path>\dmd2\windows\bin
in my PATH.
If that doesn't help, or you already have it, I'd start by getting a
normal installation/zip and see if it works, if so then replace the files
you're (re-)building and try again - it should also work.
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d-learn
mailing list