RE: Trouble getting pkg-config to work in Windows



 > The next steps are to figure out how to create projects from
 > withing Dev-C++ that do not create console windows in addition to
 > the window I create

 > I do not want to work in a GUI -- I prefer to write code

I sense an inconsistency here. If you don't want to work in a GUI, why
do you keep using Dev-C++ then?

The way to avoid console windows being created when starting an
application from Explorer is to mark the application as a "GUI" one
when linking. (Or after linking, if you have the tool for that, like
editbin.exe from Microsoft's compilers.) Use the -mwindows option to
gcc. This is not GTK+-related as such at all, but basic Windows
programming stuff.

Read up on the difference between "console" a "GUI" applications from
the mailing list archives. This has been described time and time again
on this and other GTK+ lists. Avoid reading misleading information,
though... In particular, if somebody claims that whether your code has
a main() or WinMain() function affects whether it is a "console" or
"gui" application, he is oversimplifying. (The main() vs. WinMain()
stuff is just an overridable convention implemented by Microsoft's
compilers.)

Despite the misleading names, nothing prevents "console" applications
from having a GUI, and nothing forces "GUI" applications to have a
GUI. The "console" vs. "GUI" header field can be toggled at will on
existing executables without any relinking.

Please note that if an application is marked as "GUI", by default its
standard input/output/error streams are not connected to anything upon
start. Not even if you run it from a command interpreter in a console
window! You must explicitly redirect stdout to a pipe or file to see
output from printf() etc, for instance. This is how Windows works, it
is not GTK+-related.

--tml



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