Re: Command Window with MSVC++ GTK apps



Alan M. Evans writes:
In that case it fails to link with WinMain, which of course doesn't exist.

If the linker insists on it, add a WinMain() then? It can be as simple
as:

#include <stdlib.h>
#include <windows.h>

int _stdcall
WinMain (struct HINSTANCE__ *hInstance,
         struct HINSTANCE__ *hPrevInstance,
         char               *lpszCmdLine,
         int                 nCmdShow)
{
  return main (__argc, __argv);
}

(Hmm, I don't recall why I use "struct HINSTANCE__" there and not just
"HINSTANCE". But anyway, you get the point.)

--tml




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]