Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error building QT5.14.2 mingw-x64 gcc 9.3.0

Error building QT5.14.2 mingw-x64 gcc 9.3.0

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 351 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.
  • txCodeMonkeyT Offline
    txCodeMonkeyT Offline
    txCodeMonkey
    wrote on last edited by txCodeMonkey
    #1

    Using: configure.bat -prefix "C:\Qt\5.14.2\mingw93_64" -platform win32-g++ -c++std c++17 -developer-build -shared -release -ltcg -optimize-size -gui -widgets -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -skip webengine

    It hits qtbase/src/tools/moc and errors on this line:

    g++ -Wl,-s -Wl,-subsystem,console -fno-keep-inline-dllexport -Os -std=c++1z -fno-exceptions -flto -Wl,--gc-sections -o ..\..\..\bin\moc.exe .obj/release/moc.o .obj/release/preprocessor.o .obj/release/generator.o .obj/release/parser.o .obj/release/token.o .obj/release/main.o D:\Build\QT5\mingw93_64\qtbase\lib\libQt5Bootstrap.a -luser32 -lole32 -ladvapi32 -lshell32 -lnetapi32 -luuid -lz .obj\release\moc_resource_res.o

    c:/dev/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kev\AppData\Local\Temp\moc.exe.8f0AoO.ltrans0.ltrans.o:<artificial>:(.text+0x627): undefined reference to QVarLengthArray<unsigned short, 256>::QVarLengthArray(int) [clone .lto_priv.1] [clone .lto_priv.0]' ... many more of the same ... C:\Users\kev\AppData\Local\Temp\moc.exe.8f0AoO.ltrans6.ltrans.o:<artificial>:(.text+0x4e05): undefined reference to EnumDef::EnumDef(EnumDef const&) [clone .lto_priv.0] [clone .lto_priv.0]'

    collect2.exe: error: ld returned 1 exit status

    edit: and if I explicitly told it not to build tools, why is it building moc?

    jsulmJ 1 Reply Last reply
    0
    • txCodeMonkeyT txCodeMonkey

      Using: configure.bat -prefix "C:\Qt\5.14.2\mingw93_64" -platform win32-g++ -c++std c++17 -developer-build -shared -release -ltcg -optimize-size -gui -widgets -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -skip webengine

      It hits qtbase/src/tools/moc and errors on this line:

      g++ -Wl,-s -Wl,-subsystem,console -fno-keep-inline-dllexport -Os -std=c++1z -fno-exceptions -flto -Wl,--gc-sections -o ..\..\..\bin\moc.exe .obj/release/moc.o .obj/release/preprocessor.o .obj/release/generator.o .obj/release/parser.o .obj/release/token.o .obj/release/main.o D:\Build\QT5\mingw93_64\qtbase\lib\libQt5Bootstrap.a -luser32 -lole32 -ladvapi32 -lshell32 -lnetapi32 -luuid -lz .obj\release\moc_resource_res.o

      c:/dev/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\kev\AppData\Local\Temp\moc.exe.8f0AoO.ltrans0.ltrans.o:<artificial>:(.text+0x627): undefined reference to QVarLengthArray<unsigned short, 256>::QVarLengthArray(int) [clone .lto_priv.1] [clone .lto_priv.0]' ... many more of the same ... C:\Users\kev\AppData\Local\Temp\moc.exe.8f0AoO.ltrans6.ltrans.o:<artificial>:(.text+0x4e05): undefined reference to EnumDef::EnumDef(EnumDef const&) [clone .lto_priv.0] [clone .lto_priv.0]'

      collect2.exe: error: ld returned 1 exit status

      edit: and if I explicitly told it not to build tools, why is it building moc?

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

      @txCodeMonkey said in Error building QT5.14.2 mingw-x64 gcc 9.3.0:

      why is it building moc?

      Because you activated gui/widgets and moc is needed to use these modules.

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

      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