Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. error: C1060: compiler is out of heap space

error: C1060: compiler is out of heap space

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 5 Posters 8.1k Views 1 Watching
  • 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.
  • M MasterBlade

    I'm switching from MinGW to MSVC and found a lot of problems.

    This program won't compile and C1060 error message appeared. What should I do?

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

    @MasterBlade Take a look at https://msdn.microsoft.com/en-us/library/yz7kx3y2.aspx

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

    M 1 Reply Last reply
    2
    • jsulmJ jsulm

      @MasterBlade Take a look at https://msdn.microsoft.com/en-us/library/yz7kx3y2.aspx

      M Offline
      M Offline
      MasterBlade
      wrote on last edited by
      #3

      @jsulm said in error: C1060: compiler is out of heap space:

      @MasterBlade Take a look at https://msdn.microsoft.com/en-us/library/yz7kx3y2.aspx

      I tried to add /Zm to the compiler. It will compile but nothing happens after that. No application comes out.

      jsulmJ 1 Reply Last reply
      0
      • M MasterBlade

        @jsulm said in error: C1060: compiler is out of heap space:

        @MasterBlade Take a look at https://msdn.microsoft.com/en-us/library/yz7kx3y2.aspx

        I tried to add /Zm to the compiler. It will compile but nothing happens after that. No application comes out.

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

        @MasterBlade said in error: C1060: compiler is out of heap space:

        No application comes out

        Then there should be an error

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

        M 2 Replies Last reply
        0
        • jsulmJ jsulm

          @MasterBlade said in error: C1060: compiler is out of heap space:

          No application comes out

          Then there should be an error

          M Offline
          M Offline
          MasterBlade
          wrote on last edited by
          #5

          @jsulm said in error: C1060: compiler is out of heap space:

          @MasterBlade said in error: C1060: compiler is out of heap space:

          No application comes out

          Then there should be an error

          I didn't see any error message.

          The code was alright when I use MinGW.

          I have only 12 MB in the resource qrc file. I don't know why heap space is used up. I have 32GB mem.

          1 Reply Last reply
          0
          • jsulmJ jsulm

            @MasterBlade said in error: C1060: compiler is out of heap space:

            No application comes out

            Then there should be an error

            M Offline
            M Offline
            MasterBlade
            wrote on last edited by
            #6

            @jsulm said in error: C1060: compiler is out of heap space:

            @MasterBlade said in error: C1060: compiler is out of heap space:

            No application comes out

            Then there should be an error

            OK Just to make sure I'm doing right. Is it correct to set the parameter here? I found that whatever I input here, the program compiles but nothing comes out.

            0_1533902580010_3.PNG

            jsulmJ 1 Reply Last reply
            0
            • M MasterBlade

              @jsulm said in error: C1060: compiler is out of heap space:

              @MasterBlade said in error: C1060: compiler is out of heap space:

              No application comes out

              Then there should be an error

              OK Just to make sure I'm doing right. Is it correct to set the parameter here? I found that whatever I input here, the program compiles but nothing comes out.

              0_1533902580010_3.PNG

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

              @MasterBlade Compiler flags are set in pro file via QMAKE_CXXFLAGS
              See http://doc.qt.io/qt-5/qmake-variable-reference.html

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

              M 1 Reply Last reply
              1
              • jsulmJ jsulm

                @MasterBlade Compiler flags are set in pro file via QMAKE_CXXFLAGS
                See http://doc.qt.io/qt-5/qmake-variable-reference.html

                M Offline
                M Offline
                MasterBlade
                wrote on last edited by
                #8

                @jsulm said in error: C1060: compiler is out of heap space:

                @MasterBlade Compiler flags are set in pro file via QMAKE_CXXFLAGS
                See http://doc.qt.io/qt-5/qmake-variable-reference.html

                I tried
                QMAKE_CXXFLAGS += /Zm

                with different Zm values from 10 to 1000. Still the same problem.

                It only mentions that qrc_options.cpp has this problem. Is there anything wrong with QRC files?

                0_1533907355072_3.PNG

                Gojir4G kshegunovK 2 Replies Last reply
                0
                • M MasterBlade

                  @jsulm said in error: C1060: compiler is out of heap space:

                  @MasterBlade Compiler flags are set in pro file via QMAKE_CXXFLAGS
                  See http://doc.qt.io/qt-5/qmake-variable-reference.html

                  I tried
                  QMAKE_CXXFLAGS += /Zm

                  with different Zm values from 10 to 1000. Still the same problem.

                  It only mentions that qrc_options.cpp has this problem. Is there anything wrong with QRC files?

                  0_1533907355072_3.PNG

                  Gojir4G Offline
                  Gojir4G Offline
                  Gojir4
                  wrote on last edited by
                  #9

                  @MasterBlade Try to split your resource file smaller ones. I already had a similar issue and I fixed it with this solution.

                  This last post of this thread from stackoverflow gave me the right direction:
                  "Qt resources are processed by resource compiler and .cpp file is generated for each .qrc file. I suppose your generated .cpp file is huge (should be more than 30MB) and VC compiler just can't compile such huge source file."

                  1 Reply Last reply
                  4
                  • M MasterBlade

                    @jsulm said in error: C1060: compiler is out of heap space:

                    @MasterBlade Compiler flags are set in pro file via QMAKE_CXXFLAGS
                    See http://doc.qt.io/qt-5/qmake-variable-reference.html

                    I tried
                    QMAKE_CXXFLAGS += /Zm

                    with different Zm values from 10 to 1000. Still the same problem.

                    It only mentions that qrc_options.cpp has this problem. Is there anything wrong with QRC files?

                    0_1533907355072_3.PNG

                    kshegunovK Offline
                    kshegunovK Offline
                    kshegunov
                    Moderators
                    wrote on last edited by
                    #10

                    @MasterBlade said in error: C1060: compiler is out of heap space:

                    It only mentions that qrc_options.cpp has this problem. Is there anything wrong with QRC files?

                    Use externally built resources, don't just compile 12MBs of stuff into the executable/library. You can add it as a pre-build step in creator or as an additional target in the .pro file if you wish (a bit more complicated).

                    Read and abide by the Qt Code of Conduct

                    M 1 Reply Last reply
                    3
                    • kshegunovK kshegunov

                      @MasterBlade said in error: C1060: compiler is out of heap space:

                      It only mentions that qrc_options.cpp has this problem. Is there anything wrong with QRC files?

                      Use externally built resources, don't just compile 12MBs of stuff into the executable/library. You can add it as a pre-build step in creator or as an additional target in the .pro file if you wish (a bit more complicated).

                      M Offline
                      M Offline
                      MasterBlade
                      wrote on last edited by MasterBlade
                      #11

                      @kshegunov said in error: C1060: compiler is out of heap space:

                      @MasterBlade said in error: C1060: compiler is out of heap space:

                      It only mentions that qrc_options.cpp has this problem. Is there anything wrong with QRC files?

                      Use externally built resources, don't just compile 12MBs of stuff into the executable/library. You can add it as a pre-build step in creator or as an additional target in the .pro file if you wish (a bit more complicated).

                      Thanks for the reply. Sorry I was busy these days.

                      I tried rcc command to turn the qrc file to rcc one. But the same problem happened again.

                      But strangely when I switch to Release mode everything went alright.

                      I also checked the qrc_options.cpp file it's 60.6 MB. I agree it's a little big but it's hard to believe MSVC 2017 doesn't support a file like this size. I heard it's made for big projects.

                      EDIT: I deleted old files and rebuilt the project. No errors this time. Thanks for the help.

                      0_1534186433316_w.PNG

                      1 Reply Last reply
                      3
                      • SprezzaturaS Offline
                        SprezzaturaS Offline
                        Sprezzatura
                        wrote last edited by
                        #12

                        I started getting "1060 Out of heap space" when I upgraded to Qt 6 and VS 2022. The "-std:c++17" flag triggers it.
                        The solution was to update to VS 2022 ver. 17.14.
                        This may be unrelated, but I'm posting it to help anyone else coming here with this problem.

                        1 Reply Last reply
                        0

                        • Login

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