Help with LNK2028 and LNK2019

Started by
2 comments, last by Omega147 17 years, 2 months ago
I am trying to learn the use of DirectX from the tutorials available on http://www.directtutorial.com/index.php. These are the best tutorials I have been able to find on the subject. However, I am trying to compile the preliminary Win32 exercises, without even making any DirectX calls, and I am unable to link the project. I get several LNK2028 and LNK2019 errors which apparently relate to the calls in the windowsx.h file. However, I am not getting an error that it can't find the file. My best uninformed guess is that I need to include some additional library in my project settings, but I can't find anything on the web that seems to relate directly to my circumstances. Any help would be appreciated.
Advertisement
I just tried the source out, and everything works fine; no additional libraries needed. I'm guessing you created a Win32 Console Application instead of a Win32 Project. Try recreating the project as a proper Win32 Windows application, and your linker errors should go away.

If not, then you've got other problems that will need exploring.
Omega147;

Thanks for your prompt reply. I am working in Visual C++ 2005 Express Edition. I created a CLR Empty Project. Under Win32 Project Types the Win32 Console Application template is the only one available. The "Search Online Templates" finds no additional templates, so I have no clue how to create a Win32 Windows Application.

Best!
The Win32 Project template should be there unless you unchecked a few things during installation. You may have to uninstall and reinstall Express making certain that you check items pertaining to Windows Projects so that they're installed.

There are other ways to get the templates installed without reinstalling, but from my experience and failed attempts to do so, reinstalling is the best way to go--I tried adding a C# template a while back, but after a week of trying I just reinstalled. Hope that works.

This topic is closed to new replies.

Advertisement