Error in toolchain.prf when building new project



  • I'm a new user, trying to build a new, empty project.
    Using Qt Creator 4.6.0.
    The project is a Qt Widgets Application for desktop.
    Here's an image of the kit I'm using for the build:
    0_1523939775974_Screenshot - 16-Apr-18 , 22_23_24.png
    I'm getting an error when building it, and here's an image of the error:
    0_1523939854600_Screenshot - 16-Apr-18 , 22_26_29.png
    If I use MinGW 32bit kit, it seems to work. But with MSVC2017 64bit, I'm getting the error. I have no idea what it is doing at the point of error, as I am completely new to using Qt. Any ideas on how I can get it to build without error?


  • Moderators

    @glarson Can you go to "Compile Output" (tab 5 at the bottom) and copy paste the whole build log here?



  • Thanks, here is my Compile Output:

    08:21:50: Running steps for project MyTestApp...
    08:21:50: Starting: "G:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" G:\documents\programming\QtTraining\MyTestApp\MyTestApp.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug"
    G:/Qt/5.10.1/msvc2017_64/mkspecs/features/toolchain.prf:208: Extra characters after test expression.
    Project ERROR: Compiler produced empty value for Active.
    08:21:50: The process "G:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" exited with code 3.
    Error while building/deploying project MyTestApp (kit: Desktop Qt 5.10.1 MSVC2017 64bit)
    When executing step "qmake"
    08:21:50: Elapsed time: 00:00.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Can you show the content of toolchain.prf:208 ?



  • @SGaist It won't let me upload a whole file yet, but if you look at my 2nd image above, it shows precisely where the error occurred. That is in toolchain.prf. It is calling eval($$v).


  • Lifetime Qt Champion

    Sorry, I didn't had the image when I answered.

    Looks pretty strange. Do you have Visual Studio installed in the standard location ?

    Can you modify toolchain.prf and add message("Test: $$v) before line 208 too see what might be giving that error ?



  • @SGaist I did as you said, and the message it printed was "Active code page: 65001".

    Very strange - then I recalled that some time ago I added something to my registry to set the code page of my command prompt windows to 65001:

    I had followed the instructions in this YouTube video, which had me put an autorun instruction into my registry:

    https://www.youtube.com/watch?v=y6HA_sebDZ4

    So I have just removed that item from the registry, and now the project builds and runs!

    So thank you and jsulm for your help on this. Cheers! ☕
    It was such an obscure thing.


  • Lifetime Qt Champion

    Glad you found out and thanks for sharing !

    Happy coding :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.