I use the PrintDlg() common dialog in my program (I know, I should use PrintDlgEx, but that doesn't compile at all and that's another subject which may be a MinGW problem), and the Release build works fine. The Debug build, though, does not. It refuses to link, says that PrintDlgA is undefined.
Now, I think I know what the problem is: that function is only defined for full GUI applications, not for console applications, not even ones which immediately fire up the GUI portion of the program. Fair enough, and not a Code::Blocks problem. However, I really would like my Debug build to fire up a console so I can use printf() for quick debugging messages, I find that a much more efficient way to see what goes wrong than going through GDB every time.
My questions are this:
- Am I right in my suspicion about the cause of the problem?
- Is there a way to kick Windows so that it allows a console application to use _all_ Common Dialogs including PrintDlg()?
and the Code::Blocks proper part of the question:
- If not, is there an option I can set to convince Code::Blocks, or to get it to convince MinGW, to give me a console window after all within my GUI application? There's a lot of options...
(Standard C::B installation, by the way - 16.01, MinGW 4.9, no other implementations installed; Win7 Pro, if that matters.)