Re: [gtk-list] Re: Win32 Support
- From: Tor Lillqvist <tml sgic fi>
- To: gtk-list redhat com
- Cc: hszumovs cisco com
- Subject: Re: [gtk-list] Re: Win32 Support
- Date: Thu, 22 Apr 1999 14:45:26 +0300 (EET DST)
> problem is that the Link-step stops with one severe
> error, complaining about a Winmain@16 entry which it
> cannot find. I'm sure, I'm just doing some basics wrong,
> I don't know VC well.
Add the link switch /subsystem:console to your makefile, and the
program will be built as a "console application" (meaning that it
starts running your code in the "main" function, and always has a
console window open, but it can still use all the GUI APIs (via using
GTk+ normally). If you want a "windowing application" with no console
window, use /subsystem:windows, and you will need a WinMain function,
which can be this simple in the case of GTk+ applications:
int _stdcall
WinMain (int hInstance, int hPrevInstance, char *lpszCmdLine, int nCmdShow)
{
return main (__argc, __argv);
}
Where main() is your normal main() as on Unix. (That's the GIMP's
WinMain.)
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]