Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Non-QT console program problem (Cannot obtain a handle to the inferior)



  • I use QT Creator 3.5.1 (opensource). The OS is Win7 32 bit. I create non-qt console app (pure C++ console app). I compile and run it and everything is OK. Then I add new empty cpp file (using the project menu), run it again and obtain error 'Cannot obtain a handle to the inferior'. The executable exists and run, but the QT Creator can not 'hold' it.

    The program is valid and has no errors.


  • Lifetime Qt Champion

    Hi and welcome
    sounds like this
    https://bugreports.qt.io/browse/QTCREATORBUG-13042



  • Yes, it sounds like it is.

    It happen not every time (now).
    I 'stimulated' this bag in the fallowing way: I included cpp- and h-files, which contained:
    inline function declaration / forward declaration (i.e. not definition) in the h-file;
    inline function definition in the cpp-file.
    I got the error I described above if I did not use any inlined function in the main source file. If I called any, 'unresolved reference' error appeared. And this is correct according to https://isocpp.org/wiki/faq/inline-functions .

    Removal of the 'inline' keyword solved the problem. 'Unresolved...' one gone and the initial problem appears very rare (only ones this day).


Log in to reply