Ethereal-dev: Re: [ethereal-dev] Deficiencies in the Windows version of Ethereal

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Fri, 14 Apr 2000 00:54:59 -0700
> I suspect one *can* build GTK+ applications as GUI applications - I
> think that when I fired the GIMP up on my NT partition, it didn't pop up
> a console window - but I don't know offhand whether this would oblige us
> to have "WinMain()" rather than "main()".

Well, it appears the way that the GIMP handles this is to do

	#ifdef G_OS_WIN32

	/* In case we build this as a windowed application */

	#ifdef __GNUC__
	#define _stdcall  __attribute__((stdcall))
	#endif

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

	#endif

in "main.c"; I'll try something such as that to see if it works.