Re: Gtk+ and Windows
- From: Jan Boehm <jan boehm ifp uni-stuttgart de>
- To: inra tuxfamily org
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Gtk+ and Windows
- Date: Mon, 30 Jun 2003 09:52:20 +0200
Hi,
the code-layout below has worked well for me so far. In the Project
settings for the linker you can switch in-between /subsystem:console or
/subsystem:windows . For console main is called and for windows WinMain
is called and no console appears.
This code template along with the compiler and linker options is also
included in my GTK Application Wizard for Visual Studio at
http://www.janboehm.de/Misc/GTK_AppWizard.zip, which creates all you
need for a GTK Project with only one click ;)
Jan
int main(int argc, char* argv[])
{
gtk_init (&argc, &argv);
...
}
#ifdef WIN32
#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow )
{
int argc = 1;
char* prgname = "STREAM.exe";
char** argv=&prgname;
return main(argc, argv);
}
#endif
inra tuxfamily org wrote:
Hi,
I am a computer science student which is on stage at INRA (France). I have to
develop a GUI for one of their scientific simulation.
I have choosen Gtk+ 2.0 since it's pretty well done for GUIs.
I have got one problem under Windows using Visual C++ (sorry for that, but
that's not my decision):
I could only make projects of console applications so there is always a console
window in the background. It's quiete dangerous for them because they want to
send freely the GUI to people that does not do computer for their job, but in a
certain way by obligation.
I'd like to know how to make a windows application so that console DOS mode is
avoided. For the moment, it craches when linking. It's may be due to the fact
that I don't provide any winMain function (the general way to do windows apps),
but this may not be the case.
This is quiete important for me, and I hope you could answer me in a some
quickly delay.
Cordially,
J-D Frattini
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
-----------------------------------------------------------------
_/_/_/ _/ _/ Jan Boehm Dipl.-Inform. M.Sc.
_/_/_/ _/ _/_/ Institut fuer Photogrammetrie
_/_/_/ _/ _/_/ _/ _/ Universitaet Stuttgart
_/_/_/ _/ _/ _/_/ Geschwister-Scholl-Str. 24
_/ _/ D-70174 Stuttgart
-----------------------------------------------------------------
Tel : +49-711-121-4110 Email : jan boehm ifp uni-stuttgart de
Fax : +49-711-121-3297 WWW : www.ifp.uni-stuttgart.de
-----------------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]