Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. GammaRay build Error on windows10 with Microsoft Visual Studio
QtWS25 Last Chance

GammaRay build Error on windows10 with Microsoft Visual Studio

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
9 Posts 3 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sz_y
    wrote on last edited by VRonin
    #1

    Hi,I want to build GammaRay from source on windows10 with Microsoft Visual Studio;
    when execute nmake command I get the error below:

    [ 33%] Building CXX object tests/CMakeFiles/benchsuite.dir/benchsuite_autogen/mocs_compilation.cpp.obj
    mocs_compilation.cpp
    [ 33%] Linking CXX executable ..\bin\benchsuite.exe
    [ 33%] Built target benchsuite
    Scanning dependencies of target quickmaterialtest_autogen
    [ 33%] Automatic MOC, UIC and RCC for target quickmaterialtest
    [ 33%] Built target quickmaterialtest_autogen
    Scanning dependencies of target quickmaterialtest
    [ 33%] Building CXX object tests/CMakeFiles/quickmaterialtest.dir/quickmaterialtest.cpp.obj
    quickmaterialtest.cpp
    C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): error C2131: 表达式的计算结果不是常数
    C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: 因为返回临时项或对其的引用的地址导致了故障
    C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): note: 计算“QV4::Value::undefinedValue()”时
    C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): note: 计算“QV4::Encode::undefined()”时
    C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): error C2131: 表达式的计算结果不是常数
    C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: 因为返回临时项或对其的引用的地址导致了故障
    NMAKE : fatal error U1077: “C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe”: 返回代码“0x2”
    Stop.
    NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: 返回代码“0x2”
    Stop.
    NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: 返回代码“0x2”
    Stop.
    

    what is the error? How to resolve it?
    Thank you!

    jsulmJ S 2 Replies Last reply
    0
    • S sz_y

      Hi,I want to build GammaRay from source on windows10 with Microsoft Visual Studio;
      when execute nmake command I get the error below:

      [ 33%] Building CXX object tests/CMakeFiles/benchsuite.dir/benchsuite_autogen/mocs_compilation.cpp.obj
      mocs_compilation.cpp
      [ 33%] Linking CXX executable ..\bin\benchsuite.exe
      [ 33%] Built target benchsuite
      Scanning dependencies of target quickmaterialtest_autogen
      [ 33%] Automatic MOC, UIC and RCC for target quickmaterialtest
      [ 33%] Built target quickmaterialtest_autogen
      Scanning dependencies of target quickmaterialtest
      [ 33%] Building CXX object tests/CMakeFiles/quickmaterialtest.dir/quickmaterialtest.cpp.obj
      quickmaterialtest.cpp
      C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): error C2131: 表达式的计算结果不是常数
      C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: 因为返回临时项或对其的引用的地址导致了故障
      C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): note: 计算“QV4::Value::undefinedValue()”时
      C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): note: 计算“QV4::Encode::undefined()”时
      C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): error C2131: 表达式的计算结果不是常数
      C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: 因为返回临时项或对其的引用的地址导致了故障
      NMAKE : fatal error U1077: “C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe”: 返回代码“0x2”
      Stop.
      NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: 返回代码“0x2”
      Stop.
      NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: 返回代码“0x2”
      Stop.
      

      what is the error? How to resolve it?
      Thank you!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @sz_y It would help if you would translate Chinese into English.
      This is the information about the error: https://docs.microsoft.com/de-de/cpp/error-messages/compiler-errors-1/compiler-error-c2131?view=vs-2019

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      0
      • S sz_y

        Hi,I want to build GammaRay from source on windows10 with Microsoft Visual Studio;
        when execute nmake command I get the error below:

        [ 33%] Building CXX object tests/CMakeFiles/benchsuite.dir/benchsuite_autogen/mocs_compilation.cpp.obj
        mocs_compilation.cpp
        [ 33%] Linking CXX executable ..\bin\benchsuite.exe
        [ 33%] Built target benchsuite
        Scanning dependencies of target quickmaterialtest_autogen
        [ 33%] Automatic MOC, UIC and RCC for target quickmaterialtest
        [ 33%] Built target quickmaterialtest_autogen
        Scanning dependencies of target quickmaterialtest
        [ 33%] Building CXX object tests/CMakeFiles/quickmaterialtest.dir/quickmaterialtest.cpp.obj
        quickmaterialtest.cpp
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): error C2131: 表达式的计算结果不是常数
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: 因为返回临时项或对其的引用的地址导致了故障
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): note: 计算“QV4::Value::undefinedValue()”时
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): note: 计算“QV4::Encode::undefined()”时
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): error C2131: 表达式的计算结果不是常数
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: 因为返回临时项或对其的引用的地址导致了故障
        NMAKE : fatal error U1077: “C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe”: 返回代码“0x2”
        Stop.
        NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: 返回代码“0x2”
        Stop.
        NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: 返回代码“0x2”
        Stop.
        

        what is the error? How to resolve it?
        Thank you!

        S Offline
        S Offline
        sz_y
        wrote on last edited by
        #3

        @sz_y said in GammaRay build Error on windows10 with Microsoft Visual Studio:
        error:

        [ 33%] Building CXX object tests/CMakeFiles/benchsuite.dir/benchsuite_autogen/mocs_compilation.cpp.obj
        mocs_compilation.cpp
        [ 33%] Linking CXX executable ..\bin\benchsuite.exe
        [ 33%] Built target benchsuite
        Scanning dependencies of target quickmaterialtest_autogen
        [ 33%] Automatic MOC, UIC and RCC for target quickmaterialtest
        [ 33%] Built target quickmaterialtest_autogen
        Scanning dependencies of target quickmaterialtest
        [ 33%] Building CXX object tests/CMakeFiles/quickmaterialtest.dir/quickmaterialtest.cpp.obj
        quickmaterialtest.cpp
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): error C2131: Expression does not evaluate to a constant
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: Failure due to return temporary item or the address of reference to it
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): note: compute “QV4::Value::undefinedValue()”
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): note: compute “QV4::Encode::undefined()”
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): error C2131: Expression does not evaluate to a constant
        C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: Failure due to return temporary item or the address of reference to it
        NMAKE : fatal error U1077: “C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe”: return code“0x2”
        Stop.
        NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: return code“0x2”
        Stop.
        NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: return code“0x2”
        Stop.

        jsulmJ 1 Reply Last reply
        0
        • S sz_y

          @sz_y said in GammaRay build Error on windows10 with Microsoft Visual Studio:
          error:

          [ 33%] Building CXX object tests/CMakeFiles/benchsuite.dir/benchsuite_autogen/mocs_compilation.cpp.obj
          mocs_compilation.cpp
          [ 33%] Linking CXX executable ..\bin\benchsuite.exe
          [ 33%] Built target benchsuite
          Scanning dependencies of target quickmaterialtest_autogen
          [ 33%] Automatic MOC, UIC and RCC for target quickmaterialtest
          [ 33%] Built target quickmaterialtest_autogen
          Scanning dependencies of target quickmaterialtest
          [ 33%] Building CXX object tests/CMakeFiles/quickmaterialtest.dir/quickmaterialtest.cpp.obj
          quickmaterialtest.cpp
          C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): error C2131: Expression does not evaluate to a constant
          C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: Failure due to return temporary item or the address of reference to it
          C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(673): note: compute “QV4::Value::undefinedValue()”
          C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): note: compute “QV4::Encode::undefined()”
          C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4stackframe_p.h(189): error C2131: Expression does not evaluate to a constant
          C:\Qt\Qt5.12.3\5.12.3\msvc2017\include\QtQml\5.12.3\QtQml\private/qv4value_p.h(488): note: Failure due to return temporary item or the address of reference to it
          NMAKE : fatal error U1077: “C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe”: return code“0x2”
          Stop.
          NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: return code“0x2”
          Stop.
          NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"”: return code“0x2”
          Stop.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by jsulm
          #4

          @sz_y You should try with latest Qt 5.12.x release.
          Check whether you can disable tests as it looks like the error comes from there.
          Also, you use Qt for VS2017 but VS2015. Shouldn't be an issue as compiler are now compatible.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply
          0
          • jsulmJ jsulm

            @sz_y It would help if you would translate Chinese into English.
            This is the information about the error: https://docs.microsoft.com/de-de/cpp/error-messages/compiler-errors-1/compiler-error-c2131?view=vs-2019

            S Offline
            S Offline
            sz_y
            wrote on last edited by
            #5

            @jsulm Thank you!

            1 Reply Last reply
            0
            • jsulmJ jsulm

              @sz_y You should try with latest Qt 5.12.x release.
              Check whether you can disable tests as it looks like the error comes from there.
              Also, you use Qt for VS2017 but VS2015. Shouldn't be an issue as compiler are now compatible.

              S Offline
              S Offline
              sz_y
              wrote on last edited by
              #6

              @jsulm my QT is Qt5.12.3,VS is 2015
              Because of the error "Qt5Cored.lib(Qt5Cored.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'",I set the qt path with"Qt\Qt5.12.3\5.12.3\msvc2017"

              jsulmJ 1 Reply Last reply
              0
              • S sz_y

                @jsulm my QT is Qt5.12.3,VS is 2015
                Because of the error "Qt5Cored.lib(Qt5Cored.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'",I set the qt path with"Qt\Qt5.12.3\5.12.3\msvc2017"

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @sz_y Instead of such workarounds you should use proper compiler with proper Qt. Means: if you want to build for x86_64 then use x86_64 compiler and x86_64 Qt.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                S 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @sz_y Instead of such workarounds you should use proper compiler with proper Qt. Means: if you want to build for x86_64 then use x86_64 compiler and x86_64 Qt.

                  S Offline
                  S Offline
                  sz_y
                  wrote on last edited by
                  #8

                  @jsulm said in GammaRay build Error on windows10 with Microsoft Visual Studio:

                  I don't want build x86_x64,
                  my build environment is as follow:
                  windows10
                  computer system type :64 bit os,based on x64 processor
                  VS2015
                  qt-opensource-windows-x86-5.12.3
                  CMAKE:cmake-3.10.1-win64-x64

                  What should I do?

                  1 Reply Last reply
                  0
                  • VRoninV Offline
                    VRoninV Offline
                    VRonin
                    wrote on last edited by
                    #9

                    GammaRay has a million dependencies which are hard to set up manually, the easiest way to build it is using craft.

                    You can check out the appveyor.yml file in the folder to see what commands the developers are running to build the program in their Windows CI

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    1 Reply Last reply
                    1

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved