X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/75acb5321eb950ae3b1c1507bb26eac926c2f288..a1f79c1e0064c7927ef4b8867acca5e061d1da67:/include/wx/app.h

diff --git a/include/wx/app.h b/include/wx/app.h
index 68749834a0..5538e053bd 100644
--- a/include/wx/app.h
+++ b/include/wx/app.h
@@ -380,15 +380,18 @@ public:
         #define WXAPIENTRY WXFAR wxSTDCALL
     #endif
 
+    #include <windows.h>
+    #include "wx/msw/winundef.h"
+
     #define IMPLEMENT_WXWIN_MAIN \
-        int WXAPIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,\
-                               LPSTR m_lpCmdLine, int nCmdShow )\
+        extern "C" int WXAPIENTRY WinMain(HINSTANCE hInstance,\
+                                          HINSTANCE hPrevInstance,\
+                                          LPSTR m_lpCmdLine, int nCmdShow)\
         {\
-            return wxEntry((WXHINSTANCE) hInstance, \
+            return wxEntry((WXHINSTANCE) hInstance,\
                            (WXHINSTANCE) hPrevInstance,\
                            m_lpCmdLine, nCmdShow);\
         }
-
 #else
     #define IMPLEMENT_WXWIN_MAIN
 #endif