Public Group

This topic is 4095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Recently reinstalled XP and VS Studio Pro 05 and today got around to opening my projects again. However I get WinMain linker errors. I haven't changed any of the code since I last built it before the reinstall. Even a new project with just an empty win main gets the error. I created a Win32 Project. Its set to /SUBSYSTEM:Windows. I also tried manually setting the Entry Point (in Linker options) to be the Win32 which didn't work. I think I've been stupid and missed setting an option, but I have no idea what it was >< Thanks. The error.
Quote:
 MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup C:\Projects\ix\Debug\ix.exe : fatal error LNK1120: 1 unresolved externals
Empty WinMain I'm trying to build:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
return 0;
}


##### Share on other sites
You have unicode enabled, so the entry point is a little bit different - LPTSTR instead of LPSTR, for one. Try disabling it.

##### Share on other sites
Quote:
 Original post by OluseyiYou have unicode enabled, so the entry point is a little bit different - LPTSTR instead of LPSTR, for one. Try disabling it.

The option in Configuration Properties -> General -> Character Set? I forgot to mention I have already set that to "Not Set".

##### Share on other sites
Quote:
 Original post by Khel-darThe option in Configuration Properties -> General -> Character Set? I forgot to mention I have already set that to "Not Set".

Set it to Multi-Byte to disable unicode.

##### Share on other sites
Quote:
Original post by Driv3MeFar
Quote:
 Original post by Khel-darThe option in Configuration Properties -> General -> Character Set? I forgot to mention I have already set that to "Not Set".

Set it to Multi-Byte to disable unicode.

Still can't link. I remember this happening the last time I installed but I have no idea what I did to fix it.

Edit:

Creating another project seems to build fine now. Odd. Thanks for the replies.

[Edited by - Khel-dar on September 28, 2007 5:31:26 PM]

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633708
• Total Posts
3013468
×