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. Building QT Creator from source fails
Forum Updated to NodeBB v4.3 + New Features

Building QT Creator from source fails

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 874 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.
  • U Offline
    U Offline
    unzu
    wrote on 14 Apr 2022, 13:38 last edited by
    #1

    Hello,

    I would like to design some Qt Creator plugins to generate a few reusable widgets.
    As far as I have understood, I need to build the QT Creator from source to be able to build and integrate those plugins.
    (Correct me if that is already wrong ..?)

    So I have tried to follow the instructions describing the compilation process: qt-creator.README

    1. I've cloned the creator repository inside C:\dev\src\qt-creator

    2. I've downloaded via the installer:
      2.1) Qt6.3.0 MinGW11.2.0 x64 binaries
      2.2) Qt6.3.0 Qt5 Compatibility module
      2.3) MinGW 11.2.0 x64 toolchain with gcc 11.2.0

    3. I've downloaded libclang-release_130-based-windows-mingw_64, CMake, ninja and Python3.10.
      All the paths are set (I checked with CMake -help etc. in an empty console window)

    After that I've created the build directory and ran inside:

    cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=C:\dev\Qt\6.3.0\mingw_64; C:\dev\LLVM_Clang\libclang-release_130-based-windows-mingw_64\libclang" C:\dev\src\qt-creator
    

    The configuration finishes and I am told to run

    cmake --build .
    

    The build process starts and tons of files get processed until it stops with the following error message:

    FAILED: bin/sdktool.exe
    cmd.exe /C "cd . && C:\dev\Qt\Tools\mingw1120_64\bin\c++.exe -g  src/tools/sdktool/CMakeFiles/sdktool.dir/sdktool_autogen/mocs_compilation.cpp.obj src/tools/sdktool/CMakeFiles/sdktool.dir/main.cpp.obj -o bin\sdktool.exe -Wl,--out-implib,src\tools\sdktool\libsdktool.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libsdktoolLib.a  C:/dev/Qt/6.3.0/mingw_64/lib/libQt6Core.a  -lmpr  -luserenv  -luser32  -liphlpapi  -lws2_32  -lshell32  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
    C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/tools/sdktool/CMakeFiles/sdktool.dir/main.cpp.obj: in function `printHelp(std::vector<std::unique_ptr<Operation, std::default_delete<Operation> >, std::allocator<std::unique_ptr<Operation, std::default_delete<Operation> > > > const&)':
    C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:84: undefined reference to `__imp__ZN5Utils8FilePath10fromStringERK7QString'
    C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:84: undefined reference to `__imp__ZNK5Utils8FilePath12pathAppendedERK7QString'
    C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:84: undefined reference to `__imp__ZNK5Utils8FilePath12toUserOutputEv'
    C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/tools/sdktool/CMakeFiles/sdktool.dir/main.cpp.obj: in function `parseArguments(QList<QString> const&, Settings*, std::vector<std::unique_ptr<Operation, std::default_delete<Operation> >, std::allocator<std::unique_ptr<Operation, std::default_delete<Operation> > > > const&)':
    C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:129: undefined reference to `__imp__ZN5Utils8FilePath10fromStringERK7QString'
    C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:138: undefined reference to `__imp__ZN5Utils8FilePath10fromStringERK7QString'
    collect2.exe: error: ld returned 1 exit status
    [253/2155] Linking CXX shared library lib\qtcreator\plugins\libProjectExplorer.dll
    ninja: build stopped: subcommand failed.
    

    To be honest - I am kind of lost here and do not know what to do with this error message.
    If you've got some hints on how to solve this mess I would really appreciate it.

    Thank you!

    J 1 Reply Last reply 14 Apr 2022, 14:06
    0
    • U unzu
      14 Apr 2022, 13:38

      Hello,

      I would like to design some Qt Creator plugins to generate a few reusable widgets.
      As far as I have understood, I need to build the QT Creator from source to be able to build and integrate those plugins.
      (Correct me if that is already wrong ..?)

      So I have tried to follow the instructions describing the compilation process: qt-creator.README

      1. I've cloned the creator repository inside C:\dev\src\qt-creator

      2. I've downloaded via the installer:
        2.1) Qt6.3.0 MinGW11.2.0 x64 binaries
        2.2) Qt6.3.0 Qt5 Compatibility module
        2.3) MinGW 11.2.0 x64 toolchain with gcc 11.2.0

      3. I've downloaded libclang-release_130-based-windows-mingw_64, CMake, ninja and Python3.10.
        All the paths are set (I checked with CMake -help etc. in an empty console window)

      After that I've created the build directory and ran inside:

      cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=C:\dev\Qt\6.3.0\mingw_64; C:\dev\LLVM_Clang\libclang-release_130-based-windows-mingw_64\libclang" C:\dev\src\qt-creator
      

      The configuration finishes and I am told to run

      cmake --build .
      

      The build process starts and tons of files get processed until it stops with the following error message:

      FAILED: bin/sdktool.exe
      cmd.exe /C "cd . && C:\dev\Qt\Tools\mingw1120_64\bin\c++.exe -g  src/tools/sdktool/CMakeFiles/sdktool.dir/sdktool_autogen/mocs_compilation.cpp.obj src/tools/sdktool/CMakeFiles/sdktool.dir/main.cpp.obj -o bin\sdktool.exe -Wl,--out-implib,src\tools\sdktool\libsdktool.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libsdktoolLib.a  C:/dev/Qt/6.3.0/mingw_64/lib/libQt6Core.a  -lmpr  -luserenv  -luser32  -liphlpapi  -lws2_32  -lshell32  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
      C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/tools/sdktool/CMakeFiles/sdktool.dir/main.cpp.obj: in function `printHelp(std::vector<std::unique_ptr<Operation, std::default_delete<Operation> >, std::allocator<std::unique_ptr<Operation, std::default_delete<Operation> > > > const&)':
      C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:84: undefined reference to `__imp__ZN5Utils8FilePath10fromStringERK7QString'
      C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:84: undefined reference to `__imp__ZNK5Utils8FilePath12pathAppendedERK7QString'
      C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:84: undefined reference to `__imp__ZNK5Utils8FilePath12toUserOutputEv'
      C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/tools/sdktool/CMakeFiles/sdktool.dir/main.cpp.obj: in function `parseArguments(QList<QString> const&, Settings*, std::vector<std::unique_ptr<Operation, std::default_delete<Operation> >, std::allocator<std::unique_ptr<Operation, std::default_delete<Operation> > > > const&)':
      C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:129: undefined reference to `__imp__ZN5Utils8FilePath10fromStringERK7QString'
      C:/dev/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/dev/src/qt-creator/src/tools/sdktool/main.cpp:138: undefined reference to `__imp__ZN5Utils8FilePath10fromStringERK7QString'
      collect2.exe: error: ld returned 1 exit status
      [253/2155] Linking CXX shared library lib\qtcreator\plugins\libProjectExplorer.dll
      ninja: build stopped: subcommand failed.
      

      To be honest - I am kind of lost here and do not know what to do with this error message.
      If you've got some hints on how to solve this mess I would really appreciate it.

      Thank you!

      J Offline
      J Offline
      JKSH
      Moderators
      wrote on 14 Apr 2022, 14:06 last edited by
      #2

      @unzu said in Building QT Creator from source fails:

      As far as I have understood, I need to build the QT Creator from source to be able to build and integrate those plugins.
      (Correct me if that is already wrong ..?)

      No need!

      You just need to build your plugins using a compiler and a Qt version that are compatible with the ones used to build Qt Creator. See "Help" > "About Qt Creator..." for the details.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      U 1 Reply Last reply 14 Apr 2022, 14:18
      1
      • J JKSH
        14 Apr 2022, 14:06

        @unzu said in Building QT Creator from source fails:

        As far as I have understood, I need to build the QT Creator from source to be able to build and integrate those plugins.
        (Correct me if that is already wrong ..?)

        No need!

        You just need to build your plugins using a compiler and a Qt version that are compatible with the ones used to build Qt Creator. See "Help" > "About Qt Creator..." for the details.

        U Offline
        U Offline
        unzu
        wrote on 14 Apr 2022, 14:18 last edited by
        #3

        @JKSH Ok, but when I create one of those plugin projects via the manager I need to specify the build directory of the qtCreator. It is looking for some cmake file in there it appears..?

        J 1 Reply Last reply 14 Apr 2022, 14:24
        0
        • U unzu
          14 Apr 2022, 14:18

          @JKSH Ok, but when I create one of those plugin projects via the manager I need to specify the build directory of the qtCreator. It is looking for some cmake file in there it appears..?

          J Offline
          J Offline
          JKSH
          Moderators
          wrote on 14 Apr 2022, 14:24 last edited by
          #4

          @unzu said in Building QT Creator from source fails:

          when I create one of those plugin projects via the manager I need to specify the build directory of the qtCreator. It is looking for some cmake file in there it appears..?

          The CMakeLists.txt file is part of your source code.

          You specify the directory to tell CMake where to install your plugin after building is complete.

          See https://doc.qt.io/qtcreator-extending/first-plugin.html

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          U 1 Reply Last reply 14 Apr 2022, 14:31
          1
          • J JKSH
            14 Apr 2022, 14:24

            @unzu said in Building QT Creator from source fails:

            when I create one of those plugin projects via the manager I need to specify the build directory of the qtCreator. It is looking for some cmake file in there it appears..?

            The CMakeLists.txt file is part of your source code.

            You specify the directory to tell CMake where to install your plugin after building is complete.

            See https://doc.qt.io/qtcreator-extending/first-plugin.html

            U Offline
            U Offline
            unzu
            wrote on 14 Apr 2022, 14:31 last edited by unzu
            #5

            @JKSH I am not talking about the CMakeLists of the Plugin project, just to make sure.

            When trying to compile there is an error in the "CMake-Step". It says that it could not find FindQtCreator.cmake or something like that.
            However, I was not using the proper compiler - I tried to compile it with MingW while QtCreator is compiled with MSVC (I think)
            Sadly I haven't got access to my pc right now. I will try to compile the plugin with the proper compiler as soon as I can. Thank you!

            1 Reply Last reply
            0
            • U Offline
              U Offline
              unzu
              wrote on 17 Apr 2022, 12:41 last edited by unzu
              #6

              Update:
              I have managed to build a widget plugin!
              I copied the .dll (It was installed into the directory of the Qt binaries) to the plugins directory of the qt creator.
              I am now able to drag 'n' drop my custom widget in my main application.
              What I am still missing is how to properly integrate the plugin in my project - it is looking for the header files of the plugin etc when building my main project.

              Is there a CMake-Command to include the custom plugin that I need to add to my main project or how am I supposed to include the plugin?

              Thanks again for your support and time!

              J 1 Reply Last reply 19 Apr 2022, 07:00
              0
              • U unzu
                17 Apr 2022, 12:41

                Update:
                I have managed to build a widget plugin!
                I copied the .dll (It was installed into the directory of the Qt binaries) to the plugins directory of the qt creator.
                I am now able to drag 'n' drop my custom widget in my main application.
                What I am still missing is how to properly integrate the plugin in my project - it is looking for the header files of the plugin etc when building my main project.

                Is there a CMake-Command to include the custom plugin that I need to add to my main project or how am I supposed to include the plugin?

                Thanks again for your support and time!

                J Offline
                J Offline
                JKSH
                Moderators
                wrote on 19 Apr 2022, 07:00 last edited by
                #7

                @unzu said in Building QT Creator from source fails:

                Update:
                I have managed to build a widget plugin!
                I copied the .dll (It was installed into the directory of the Qt binaries) to the plugins directory of the qt creator.
                I am now able to drag 'n' drop my custom widget in my main application.

                Great!

                What I am still missing is how to properly integrate the plugin in my project - it is looking for the header files of the plugin etc when building my main project.

                Is there a CMake-Command to include the custom plugin that I need to add to my main project or how am I supposed to include the plugin?

                Thanks again for your support and time!

                I'm afraid I don't have experience with creating Qt Creator plugins.

                Perhaps you can study an existing plugin, like Qwt's one: https://sourceforge.net/p/qwt/git/ci/develop/tree/designer/ (it uses qmake instead of CMake, but it should provide some clues)

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                0

                1/7

                14 Apr 2022, 13:38

                • Login

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