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 when trying to build static Qt5 library on windows 10
Forum Updated to NodeBB v4.3 + New Features

Error when trying to build static Qt5 library on windows 10

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 665 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
    SpaceEye
    wrote on 19 May 2022, 09:21 last edited by SpaceEye
    #1

    I am trying to build static Qt5 library. Everything goes well, until I run mingw32-make.
    My confugure command: configure -static -platform win32-g++ -prefix "C:\libs\qt\5.15.2\static_lib" -release -opensource -confirm-license -nomake examples -nomake tools -opengl desktop -no-angle -qt-sqlite -make libs -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype
    Here is the error:

    In file included from mimetypes\qmimeprovider.cpp:67:
    .rcc\release/qmimeprovider_database.cpp:1:14: warning: unknown escape sequence: '\P'
     & : The term 'C:\ProgramData\Anaconda3\Scripts\conda.exe' is not recognized as the name of a cmdlet, function, script
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    .rcc\release/qmimeprovider_database.cpp:1:14: warning: unknown escape sequence: '\A'
    .rcc\release/qmimeprovider_database.cpp:1:14: warning: unknown escape sequence: '\S'
    .rcc\release/qmimeprovider_database.cpp:1:14: warning: unknown escape sequence: '\c'
    .rcc\release/qmimeprovider_database.cpp:1:14: warning: character constant too long for its type
    .rcc\release/qmimeprovider_database.cpp:4:6: error: stray '\' in program
     At E:\WindowsPowerShell\profile.ps1:4 char:4
          ^
    .rcc\release/qmimeprovider_database.cpp:4:7: error: stray '\214' in program
     At E:\mои WindowsPowerShell\profile.ps1:4 char:4
           ^
    .rcc\release/qmimeprovider_database.cpp:4:8: error: stray '\256' in program
     At E:\01;31mои WindowsPowerShell\profile.ps1:4 char:4
            ^
    .rcc\release/qmimeprovider_database.cpp:4:9: error: stray '\250' in program
     At E:\01;31mи WindowsPowerShell\profile.ps1:4 char:4
             ^
    .rcc\release/qmimeprovider_database.cpp:4:11: error: stray '\204' in program
     At E:\01;31mmокументы\WindowsPowerShell\profile.ps1:4 char:4
               ^
    .rcc\release/qmimeprovider_database.cpp:4:12: error: stray '\256' in program
     At E:\01;31mокументы\WindowsPowerShell\profile.ps1:4 char:4
                ^
    .rcc\release/qmimeprovider_database.cpp:4:13: error: stray '\252' in program
     At E:\01;31mкументы\WindowsPowerShell\profile.ps1:4 char:4
                 ^
    .rcc\release/qmimeprovider_database.cpp:4:14: error: stray '\343' in program
     At E:\01;31mументы\WindowsPowerShell\profile.ps1:4 char:4
                  ^
    .rcc\release/qmimeprovider_database.cpp:4:15: error: stray '\254' in program
     At E:\01;31mменты\WindowsPowerShell\profile.ps1:4 char:4
                   ^
    .rcc\release/qmimeprovider_database.cpp:4:16: error: stray '\245' in program
     At E:\01;31mенты\WindowsPowerShell\profile.ps1:4 char:4
                    ^
    .rcc\release/qmimeprovider_database.cpp:4:17: error: stray '\255' in program
     At E:\01;31mнты\WindowsPowerShell\profile.ps1:4 char:4
                     ^
    .rcc\release/qmimeprovider_database.cpp:4:18: error: stray '\342' in program
     At E:\01;31mты\WindowsPowerShell\profile.ps1:4 char:4
                      ^
    .rcc\release/qmimeprovider_database.cpp:4:19: error: stray '\353' in program
     At E:\01;31mы\WindowsPowerShell\profile.ps1:4 char:4
                       ^
    .rcc\release/qmimeprovider_database.cpp:4:20: error: stray '\' in program
     At E:\01;31m\WindowsPowerShell\profile.ps1:4 char:4
                        ^
    .rcc\release/qmimeprovider_database.cpp:4:38: error: stray '\' in program
     At E:\WindowsPowerShell\profile.ps1:4 char:4
                                          ^
    .rcc\release/qmimeprovider_database.cpp:5:70: warning: missing terminating " character
     + (& "C:\ProgramData\Anaconda3\Scripts\conda.exe" "shell.powershell" "h ...
                                                                          ^
    .rcc\release/qmimeprovider_database.cpp:5:70: error: missing terminating " character
     + (& "C:\ProgramData\Anaconda3\Scripts\conda.exe" "shell.powershell" "h ...
                                                                          ^~~~~~
    .rcc\release/qmimeprovider_database.cpp:7:50: error: stray '\' in program
         + CategoryInfo          : ObjectNotFound: (C:\ProgramData\...ripts\conda.exe:String) [], CommandNotFoundException
                                                      ^
    .rcc\release/qmimeprovider_database.cpp:7:62: error: stray '\' in program
         + CategoryInfo          : ObjectNotFound: (C:\ProgramData\...ripts\conda.exe:String) [], CommandNotFoundException
                                                                  ^
    .rcc\release/qmimeprovider_database.cpp:7:71: error: stray '\' in program
         + CategoryInfo          : ObjectNotFound: (C:\ProgramData\...ripts\conda.exe:String) [], CommandNotFoundException
                                                                           ^
    .rcc\release/qmimeprovider_database.cpp:1:3: error: expected unqualified-id before ':' token
     & : The term 'C:\ProgramData\Anaconda3\Scripts\conda.exe' is not recognized as the name of a cmdlet, function, script
       ^
    In file included from global\qt_pch.h:56:
    mimetypes\qmimeprovider.cpp: In constructor 'QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate*, QMimeXMLProvider::InternalDatabaseEnum)':
    mimetypes\qmimeprovider.cpp:638:30: error: 'mimetype_database' was not declared in this scope
         Q_STATIC_ASSERT_X(sizeof(mimetype_database), "Bundled MIME database is empty");
                                  ^~~~~~~~~~~~~~~~~
    global/qglobal.h:121:68: note: in definition of macro 'Q_STATIC_ASSERT_X'
     #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                        ^~~~~~~~~
    mimetypes\qmimeprovider.cpp:638:30: note: suggested alternative: 'mimeTypeForName'
         Q_STATIC_ASSERT_X(sizeof(mimetype_database), "Bundled MIME database is empty");
                                  ^~~~~~~~~~~~~~~~~
    global/qglobal.h:121:68: note: in definition of macro 'Q_STATIC_ASSERT_X'
     #  define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                        ^~~~~~~~~
    mingw32-make[4]: *** [Makefile.Release:56641: .obj/release/qmimeprovider.o] Error 1
    mingw32-make[4]: Leaving directory 'C:/libs/qt/5.15.2/Src/qtbase/src/corelib'
    mingw32-make[3]: *** [Makefile:45: release] Error 2
    mingw32-make[3]: Leaving directory 'C:/libs/qt/5.15.2/Src/qtbase/src/corelib'
    mingw32-make[2]: *** [Makefile:231: sub-corelib-make_first] Error 2
    mingw32-make[2]: Leaving directory 'C:/libs/qt/5.15.2/Src/qtbase/src'
    mingw32-make[1]: *** [Makefile:54: sub-src-make_first] Error 2
    mingw32-make[1]: Leaving directory 'C:/libs/qt/5.15.2/Src/qtbase'
    mingw32-make: *** [Makefile:91: module-qtbase-make_first] Error 2
    

    I have anaconda, and "C:\ProgramData\Anaconda3\Scripts\conda.exe" If that matters.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SpaceEye
      wrote on 20 May 2022, 11:07 last edited by
      #6

      The problem is not solved, but i tinkered with cmake and my program compiled, so i don't care anymore.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hskoglund
        wrote on 19 May 2022, 19:13 last edited by
        #2

        Hi, just a guess, but do you run the configure command from within a Powershell window? If yes, try to run it from a CMD window.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SpaceEye
          wrote on 19 May 2022, 19:59 last edited by
          #3

          Nope, powershell and cmd give the same error.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hskoglund
            wrote on 19 May 2022, 20:21 last edited by
            #4

            Perhaps your Ruby or Perl (or Python) versions installed are too old?
            For building 5.15.2 with MinGW there's a pretty good Qt wiki page here where the requirements for Ruby, Perl and Python are listed.

            1 Reply Last reply
            1
            • S Offline
              S Offline
              SpaceEye
              wrote on 20 May 2022, 08:39 last edited by
              #5

              Perl, Ruby and python are all installed. Same error.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SpaceEye
                wrote on 20 May 2022, 11:07 last edited by
                #6

                The problem is not solved, but i tinkered with cmake and my program compiled, so i don't care anymore.

                1 Reply Last reply
                0

                1/6

                19 May 2022, 09:21

                • Login

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