www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Undefined Symbol - Function not found in ws2_32.lib

This will not compile:

<code>
private import std.c.windows.windows;
private import std.c.windows.winsock;

alias HANDLE WSAEVENT;

extern (Windows) int WSAEventSelect(SOCKET s, WSAEVENT hEventObject, 
long lNetworkEvents);

int main()
{
	WSADATA wsad;
	WSAStartup(cast(ushort)0x202, &wsad);
	WSAEVENT eventhdl;
	WSAEventSelect(0, eventhdl, 0);
	WSACleanup();
	return 0;
}
</code>


Deleting intermediate files and output files for project 'WSAEvent', 
configuration 'Release|Win32'.

Performing Pre-Build Event...
c:\dmd\dmd\bin\..\..\dm\bin\link.exe 
main,,,ws2_32.lib+user32+kernel32/co/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

main.obj(main)
  Error 42: Symbol Undefined _WSAEventSelect 16
--- errorlevel 1
Project : error PRJ0019: A tool returned an error code from "Performing 
Pre-Build Event..."
Apr 27 2005