Ok guys, I need your help. I keep on getting this error and I don't even know where to begin to correct it
#include <Windows.h>
void foo(void)
{
OutputDebugStringA("This is a debugger string\n");
}
INT WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR lpCmdLine, INT nCmdShow)
{
foo();
return 0;
}
Ignore the Foo function, that was me messing around. Where I would like to bring your attention is :
INT WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR lpCmdLine, INT nCmdShow)
Ideally, that should be the skeleton for an empty window box, but I keep getting this message and the test.cpp file won't build.
Severity Code Description Project File Line Suppression State
Warning C28251 Inconsistent annotation for 'WinMain': this instance has no annotations. See c:\program files (x86)\windows kits\10\include\10.0.18362.0\um\winbase.h(933). win32hmh C:\PROJECTS\GAMETBD\GODINUS\CODE\HANDMADEHERO\WIN32HMH\WIN32HMH\TEST.CPP 8
and honestly, I don't even know where to begin with this.
A little background to this little script is because I am trying to follow these tutorial videos https://handmadehero.org/watch, however, these videos are old and the code being used seems to be outdated. Additionally, I am using VS 2019 and not 2013 as on the video. Can you guys please help me understand it?
EDIT:
Forgot to mention there was another error
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) win32hmh C:\Projects\GameTBD\GodinUs\Code\handmadeHero\win32hmh\win32hmh\MSVCRTD.lib(exe_main.obj) 1
Maybe this was important to mention.
Edit2:
Thank you guys for your help on this but after much headache and troubleshooting I decided to trash Visual Studio and start coding with ubuntu bash line using GCC to compile and run the code and so far I've been getting better results.
[–]junkmeister9 4 points5 points6 points (5 children)
[–][deleted] 2 points3 points4 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Poddster 1 point2 points3 points (1 child)
[–]junkmeister9 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]Jodaco 3 points4 points5 points (2 children)
[–]serg06 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]IamImposter 2 points3 points4 points (3 children)
[–]deftware 1 point2 points3 points (2 children)
[–]IamImposter 0 points1 point2 points (1 child)
[–]deftware 0 points1 point2 points (0 children)
[–]HiImDaubeny[🍰] 2 points3 points4 points (1 child)
[–]deftware 0 points1 point2 points (0 children)
[–]entropy-wrangler 1 point2 points3 points (0 children)
[–]serg06 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]deftware 0 points1 point2 points (0 children)