View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014685CMakeQtDialogpublic2014-01-07 04:152016-06-10 14:31
ReporterWoomla 
Assigned ToClinton Stimpson 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformWindowsOSWindowsOS Version8.1
Product VersionCMake 2.8.12 
Target VersionFixed in Version 
Summary0014685: cmake-gui does not display text in console
DescriptionCmake-gui does not display any text in a windows console.
Steps To Reproduce1. Start console: cmd.exe.
2. Execute: cmake-gui --help.
Additional InformationI expect the help text to be displayed, just like cmake does.
Instead nothing seems to happen, no gui, no help text.

Running: cmake-gui --help cmake-help.txt creates the file with the expected text. I was looking for the command-line parameters (-H and -B).


Probably the cause is that when writing to the console in a Qt GUI project (in windows 8.1) the text is not written to the parent console. Redirecting the text works.

To attach to the parent console I once did (when not starting the gui):
AttachConsole(-1);freopen("CONOUT$", "w", stdout);
But this leaves the console open...
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0034913)
Clinton Stimpson (developer)
2014-01-07 21:12

This seems a bit difficult. I happened to experiment with this using Visual Studio 11. I wanted to make sure that redirection to a file would keep working (cmake-gui --help > help.txt).

To redirect to the console, we need to do freopen(), but only if it isn't redirected to a file.

_fileno(stdout) might give some indication of this because it is supposed to return -1 or -2 for non-gui apps, and I assume that it does so if there is no redirection.
But _fileno(stdout) is broken under some versions of Visual Studio.
https://connect.microsoft.com/VisualStudio/feedback/details/785119/ [^]

So, I don't yet see a robust way to do this.
Do you have a suggested patch to cmake-gui?
(0034942)
Woomla (reporter)
2014-01-15 03:07

Currently I have no clue how to solve this.
(0042460)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-01-07 04:15 Woomla New Issue
2014-01-07 08:59 Brad King Assigned To => Clinton Stimpson
2014-01-07 08:59 Brad King Status new => assigned
2014-01-07 21:12 Clinton Stimpson Note Added: 0034913
2014-01-15 03:07 Woomla Note Added: 0034942
2016-06-10 14:29 Kitware Robot Note Added: 0042460
2016-06-10 14:29 Kitware Robot Status assigned => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team