[CMake] Call to QTextStream(stdin) crashes the program built by CMake and Visual Studio

Yegor Derevenets yegor.derevenets at gmail.com
Wed Nov 23 08:53:42 EST 2011


Hi All,

The following Qt program crashes with access violation when being built
on Windows by Microsoft Visual Studio 2010 using cmake 2.8.6 and doesn't
crash when being built using qmake:

#include <cstdio>
#include <QTextStream>

int main(int argc, char *argv[]) {
    QTextStream qin(stdin, QIODevice::ReadOnly);

    return 0;
}

Expected behaviour would be that the program wouldn't crash in both cases.

The example and generated configuration files are available in the archive:
http://yegor.f1recat.com/cmake_vs_qmake.7z

The Qt version used is 4.7.4. Arguments to configure were:
-release -shared -no-webkit -nomake examples -nomake demos

The problem seems to be remotely similar to this one (although in my case
nobody must be trying to do static linking):
https://bugreports.qt.nokia.com//browse/QTBUG-9272

Any ideas on what to look at next?

-- 
Yegor Derevenets


More information about the CMake mailing list