Search code examples
visual-studio-2010debugginggtkvisual-studio-debugging

Debugging GTK+ on windows


I downloaded GTK+ for windows and included the library in my Visual Studio 2010 and it works fine, but I don't know how to output text to the console or any other form for debugging. I tried g_print("hi"); and even std::cout << "cout test"; but nothing shows up.

Is there a way to debug in windows?


Solution

  • In gcc there is the -mwindows flag that sets the PE header subsystem type to get a GUI application. Without it you'll get two windows: one with the GTK+ GUI and one with a console where stdout and stderr are redirected. I suspect there is something similar also in Visual Studio, maybe specifying in some way your application is console based.