RE: Trouble getting pkg-config to work in Windows




Both of the suggestions below worked. The command

   editbin /SUBSYSTEM:WINDOWS <executable_file>
removed the switch in the executable that runs a console window, AND

adding the compiler switch -mwindows  to the make files created
executables w/o console windows. 

I am new to this user group, and the experience so far has been
very positive. Thank you to all.

--Stewart



> 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]