Skip to content

Commit

Permalink
win32: replace manual WinMain with mainCRTStartup
Browse files Browse the repository at this point in the history
the mainCRTStartup essentially does the same thing and gets
auto-generated from the compiler.
  • Loading branch information
dannyedel committed Apr 4, 2016
1 parent 038e8ab commit 0889bac
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions main.cpp
Expand Up @@ -29,21 +29,17 @@
#include <QTranslator>
#include <QLibraryInfo>

#if defined ( _WIN32 ) && defined ( NDEBUG )
#pragma comment(linker, "/SUBSYSTEM:windows")
#include <Windows.h>
#if defined ( _WIN32 )
#pragma comment(linker, "/ENTRY:mainCRTStartup")

int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
int argc = __argc;
#define argv __argv
#if defined( NDEBUG )
#pragma comment(linker, "/SUBSYSTEM:windows")
#endif

#else
#endif

int main(int argc, char** argv)
{

#endif
QApplication app(argc, argv);

app.setApplicationName( QString::fromUtf8("dspdfviewer") );
Expand Down

0 comments on commit 0889bac

Please sign in to comment.