Unresolved external symbol

Ga via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 1 15:23:20 PDT 2014


I have the following code:

import std.stdio;

version(Windows)
{
	extern(Windows)
	{
		nothrow
		{
			alias void *HANDLE;
			alias HANDLE HDC;
			int GetDeviceCaps(HDC, int);
		}
	}
}

int main()
{
	int left = GetDeviceCaps(null, 8);

	readln();

	return 0;
}

And I am getting a "error LNK2019: unresolved external symbol 
GetDeviceCaps referenced in function _Dmain"

Why is that? I'm obviously missing something here, because 
another function, GetDC works properly..


More information about the Digitalmars-d-learn mailing list