Created
June 8, 2018 19:55
-
-
Save domeniko-gentner/598f6166df7d7f130a6d5fbf69d16c16 to your computer and use it in GitHub Desktop.
Cross platform main/WinMain combo
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
//----------------------------------------------------------------- | |
int main(int argc, char** argv) | |
//----------------------------------------------------------------- | |
{ | |
// Continue as usual... | |
} | |
#ifdef _WINDOWS | |
#include "Windows.h" | |
//----------------------------------------------------------------- | |
int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, | |
_In_ LPSTR lpCmdLine, _In_ int nCmdShow) | |
//----------------------------------------------------------------- | |
{ | |
return main(__argc, __argv); | |
} | |
#endif // #ifdef _WINDOWS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment