# Error LNK2028 when trying to complie DX stuff

## Recommended Posts

I'm a newbie to direct x, and just got the DX SDK. Trying to complie the SDK'S samples and the book's ones the complier returns a lot of errors that look like this:
3DIntro.obj : error LNK2028: unresolved token (0A00005D) "extern "C" unsigned short __stdcall RegisterClassExA(struct tagWNDCLASSEXA const *)" (?RegisterClassExA@@$$J14YGGPBUtagWNDCLASSEXA@@@Z) referenced in function "extern "C" int __stdcall WinMain(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int)" (?WinMain@@$$J216YGHPAUHINSTANCE__@@0PADH@Z)

How can i fix this stuff?

##### Share on other sites
RegisterClassEx() is a regular Win32 call - nothing directly related to DirectX.

At a guess you've not got the Platform SDK configured or installed. But without any details on which versions of the SDK's (both DX and Platform) or the IDE/Compiler name (you're not using Visual C++ 6 are you? [grin]) it's difficult to say any more.

As a side note about your book's sample code - make sure you use the SDK that came with the book. Books move slower than the DX SDK's - we get a lot of threads (although I dont think yours is) where people download the latest SDK and find it explodes when compiling sample code from a book...

hth
Jack

##### Share on other sites
The complier is VC++ 2005 Express
The SDK is April 2006
DX samples don't work either.. Same errors

##### Share on other sites
Did you configure MS VS 2005 Express to use with the Platform SDK?

regards
thallish

##### Share on other sites
yes i did..

still won't work, dammit

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
627708
• Total Posts
2978732

• 21
• 14
• 12
• 22
• 35