No Output to Console (GUI application)?

Mar 26, 2016 at 6:18am
Strange problem.
I've built a GUI application using C++ with a TDM MINGW64 C++ compiler using Codeblocks on Windows.

This gui application runs fine but I need to use the output console for checking alternate output or debugging.

The console shows fine (i set that in the codeblocks properties) but there is no output to the console.

I have found the reason but I'm not sure I understand it. In my linker settings under 'Linker Options' i have added the flag -mwindows . The gui application (FLTK) builds fine when this is there. Unfortunately I have no console output while it is there. If I take it away, the complete application will not compile without linker errors. (I have to strip the program down to a basic hello world program to determine this).

So.. what could I put as a linker option other than -mwindows that will allow me to have console output and compile and link my GUI application.

Thanks
Windows 7, Codeblocks, gcc (tdm64-1) 5.1.0, 64 bit.
Mar 26, 2016 at 6:31am
I found a solution. I need to put -mconsole in my linker options. I'm not sure I understand why but it works.
Topic archived. No new replies allowed.