Created
December 23, 2024 20:44
-
-
Save danielsource/91965bae5c1285aa7355005a42108c13 to your computer and use it in GitHub Desktop.
win32_hello
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Build script. | |
@echo off | |
setlocal | |
set VSLANG=1033 | |
set flags=/nologo /std:c++14 /Zi /W4 /wd4100 | |
if not exist win32_precomp.pch ( | |
cl %flags% /Yc"win32_precomp.hpp" /c win32_precomp.cpp | |
) | |
cl %flags% /Fe"hello.exe" /Yu"win32_precomp.hpp" win32_hello.cpp /link win32_precomp.obj user32.lib | |
endlocal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "win32_precomp.hpp" | |
int WINAPI | |
WinMain(HINSTANCE hInstance, | |
HINSTANCE hPrevInstance, | |
PSTR lpCmdLine, | |
int nCmdShow) | |
{ | |
int i = 42; | |
char s[3]; | |
s[0] = (char)(i / 10) + '0'; | |
s[1] = (char)(i % 10) + '0'; | |
s[2] = '\0'; | |
OutputDebugStringA(s); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "win32_precomp.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Precompiled header. */ | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment