Important: Please read the Qt Code of Conduct -

Failed to parse default paths from copiler output

  • I'm currently working with QT5.12.1 on Windows 10, and when I create a new blank project, I get the following message in QTCreators console:

    Running Windows Runtime device detection.
    No winrtrunner.exe found.
    C:/Qt/Qt5.12.1/5.12.1/mingw73_64/mkspecs/features/toolchain.prf(76): Variable QMAKE_CXX.COMPILER_MACROS is not defined.
    Project ERROR: failed to parse default search paths from compiler output
    Error while parsing file C:\Qt\Test\Proj\ Giving up

    I've inspected toolchain.prf and notice that this error message originates from the following line:

    error("failed to parse default search paths from compiler output")

    Does anyone have any ideas why either of these two variables are not being set?
    Note: If I try to build the project (in QTCreator), close it and then open it again, it all works normally.
    Also, I have multiple versions of MSVC on my machine, but am building using a MINGW kit. I suspect the problem is rooted in this, because I can get the exact same QT setup to work on a near-identical windows machine, only without MSVC on it.

  • OK, well I've gotten a little closer to solving this. I know what is going wrong, but I don't know why. On my laptop and desktop I have identical installations of QT and QtCreator. The desktop is the problematic installation. Here's where the problem arises:
    If open QtCreator and Create a New Project, under C:\Qt\TempProj\ and I name the file "TempProj", My Laptop will create the following build directories by default:
    If I follow the EXACT same procedure (to the keystroke) my desktop will present me with the following default project directories:

    If I ignore the warnings and proceed, I get the error message above, QT can't find the course code, I can't build anything, etc.
    If I manually "correct" the build path so that it does not use the Nest"TestProj" path in the build target... I still see the error message above. But if I attempt a build (forcing it to build the actual path) and then navigate to that folder via "Projects>>Build Directory" Qt is suddenly aware of the source code and everything works as it should.

    I appreciate that this is an odd problem, but it's annoying to have to do this little dance each time I want to create a new project and for the life of me, I can't work out why two identical installations of QT make two different default build paths.

    So if anyone has any ideas, that would be appreciated.

  • Lifetime Qt Champion

    @NickM I don't know why you get different behaviour, but I'm wondering why you put your projects into Qt installation directory?

  • @jsulm No particular reason, and for what it's worth, this problem happens irrespective of this.

  • I would like to know how you solved this problem,could you tell me ,please?

  • @jsulm do you know how did the author solve this problem?

  • Lifetime Qt Champion

    @luoluo I don't know whether the OP solved this problem.
    I suggest you open your own topic and describe your situation properly.

Log in to reply