Hello to all.
I've been scratching my head since morning (last 8 hours), but of no use, tried all google but couldn't resolve it(I didn't want to post but can't help it now).
I started learning Win API newly and trying to execute following code in a new project (I've tried all 3 types of: win32 application , win32 Program , win32 console). While compiling it gives a warning:
function 'wmain' can't be __stdcall, changed to __cdel
Then I get error while building:
Unresolved external symbol '_Winmain@16'
fatal error: 1 unresolved external(s)
The code is:
#include <windows.h>
#include <wchar.h>
int wmain(void)
{
char *name = "Jane";
wchar_t *town = L"Bratislava";
wprintf(L"The length of the name string is %d\n", lstrlenA(name));
wprintf(L"The town string length is %d\n", lstrlenW(town));
return 0;
}
Plz guide how to resolve it. I have come from python background. Learnt C 1 yr back & never worked before in this type of IDE. Plz post some kind of instructions also about which type of project to choose for which programs. So that it could help other beginers as well. (I've enabled microsoft extensions, read the help file also.)
Thanks in advance.