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. Qt creator - cross-compile
Forum Updated to NodeBB v4.3 + New Features

Qt creator - cross-compile

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 2 Posters 4.4k 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.
  • P Offline
    P Offline
    peter_cz
    wrote on last edited by
    #1

    Dears,

    I wanna use Qt creator to cross-compile and develop application for target embedded processor. I have cross-compilation toolchain and I did set it up as of here https://www.ics.com/blog/configuring-qt-creator-raspberry-pi
    In some steps of "qmake location set " I do not have qmake on my target and just autobuild tools (make), On target platform there is no Qt, still I can use qt Creator?
    If so, how to set it up for plain make?

    Thank you.

    jsulmJ 1 Reply Last reply
    0
    • P peter_cz

      Dears,

      I wanna use Qt creator to cross-compile and develop application for target embedded processor. I have cross-compilation toolchain and I did set it up as of here https://www.ics.com/blog/configuring-qt-creator-raspberry-pi
      In some steps of "qmake location set " I do not have qmake on my target and just autobuild tools (make), On target platform there is no Qt, still I can use qt Creator?
      If so, how to set it up for plain make?

      Thank you.

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

      @peter_cz Just don't add any qmake. In your project settings go to "Build Settings" and add new build step as Make (there is "Add Build Step" button).

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

      1 Reply Last reply
      0
      • P Offline
        P Offline
        peter_cz
        wrote on last edited by
        #3

        What "Build Settings"?

        Tools->Options->Build & Run

        where I do build settings.

        jsulmJ 1 Reply Last reply
        0
        • P peter_cz

          What "Build Settings"?

          Tools->Options->Build & Run

          where I do build settings.

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

          @peter_cz In QtCreator on the left side click on Projects

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

          1 Reply Last reply
          0
          • P Offline
            P Offline
            peter_cz
            wrote on last edited by
            #5

            OK, but when starting a new project, "Build System" wnats define build system. there are options as qmake, CMake, Qbs so when those not available then want to use for that cross-compile just "make". So that's setup here I need to change and that follows my define "Kits" for embedded platform.
            So point is that "Kits" has make Build System but no qmake,CMake,Qbs.
            That's somehow possible and how to setup?

            Thank you.

            jsulmJ 1 Reply Last reply
            0
            • P peter_cz

              OK, but when starting a new project, "Build System" wnats define build system. there are options as qmake, CMake, Qbs so when those not available then want to use for that cross-compile just "make". So that's setup here I need to change and that follows my define "Kits" for embedded platform.
              So point is that "Kits" has make Build System but no qmake,CMake,Qbs.
              That's somehow possible and how to setup?

              Thank you.

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

              @peter_cz said in Qt creator - cross-compile:

              So point is that "Kits" has make Build System but no qmake,CMake,Qbs.

              I would suggest to use CMake if you don't have qmake on your development machine. Writing makefiles manually for non trivial projects is wasting of time and asking for troubles. And if you're going to support multiple platforms with your project then you would have even more work.

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

              1 Reply Last reply
              0
              • P Offline
                P Offline
                peter_cz
                wrote on last edited by
                #7

                understand :)

                I got "cross toolchain" on my local linux/ubuntu machine "/opt/my_machine/sysroots" with subfolders "aarch64-poky-linux" and "x86_64-pokysdk-linux"

                now I'm looking for a way how to configure it within QT Creator to compile with cross-tooclhain for embedded target platform.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  peter_cz
                  wrote on last edited by
                  #8

                  I do not have "cmake" available now for that target just "make" and by configuraion via Build & Run does not allow me to have just "make"

                  in my cross-toolchain I have compiler:
                  "/opt/my_machine/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-gcc"

                  can find executable for make
                  "/opt/my_machine/sysroots/aarch64-poky-linux/usr/bin/make

                  so now it's question how to configure Build & Run and have own kit in "Kits" for this ?

                  jsulmJ 1 Reply Last reply
                  0
                  • P peter_cz

                    I do not have "cmake" available now for that target just "make" and by configuraion via Build & Run does not allow me to have just "make"

                    in my cross-toolchain I have compiler:
                    "/opt/my_machine/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-gcc"

                    can find executable for make
                    "/opt/my_machine/sysroots/aarch64-poky-linux/usr/bin/make

                    so now it's question how to configure Build & Run and have own kit in "Kits" for this ?

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

                    @peter_cz Just install CMake from your distribution on the host machine.

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

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      peter_cz
                      wrote on last edited by
                      #10

                      do have install on my side - then?

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        peter_cz
                        wrote on last edited by
                        #11

                        Running "/usr/bin/cmake /home/ubuntu/untitled '-GCodeBlocks - Unix Makefiles' -DCMAKE_CXX_COMPILER:STRING=/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -DCMAKE_C_COMPILER:STRING=/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc '-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}' -DQT_QMAKE_EXECUTABLE:STRING=" in /tmp/QtCreator-RNTh55/qtc-cmake-XXBJrDUE.
                        Running "/usr/bin/cmake /home/ubuntu/untitled '-GCodeBlocks - Unix Makefiles' -DCMAKE_CXX_COMPILER:STRING=/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -DCMAKE_C_COMPILER:STRING=/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc '-DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}' -DQT_QMAKE_EXECUTABLE:STRING=" in /tmp/QtCreator-RNTh55/qtc-cmake-XXTKyg1d.
                        -- The C compiler identification is GNU 6.2.0
                        -- The CXX compiler identification is GNU 6.2.0
                        -- Check for working C compiler: /opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc
                        -- Check for working C compiler: /opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -- broken
                        CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
                        The C compiler
                        "/opt/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
                        is not able to compile a simple test program.

                        It fails with the following output:

                        Change Dir: /tmp/QtCreator-RNTh55/qtc-cmake-XXTKyg1d/CMakeFiles/CMakeTmp

                        Run Build
                        Command:"/opt/sysroots/aarch64-poky-linux/usr/bin/make"
                        "cmTC_5dbdc/fast"

                        /opt/sysroots/aarch64-poky-linux/usr/bin/make:
                        1:
                        /opt/sysroots/aarch64-poky-linux/usr/bin/make:
                        Syntax error: "(" unexpected

                        CMake will not be able to correctly generate this project.
                        Call Stack (most recent call first):
                        CMakeLists.txt:3 (project)

                        -- Configuring incomplete, errors occurred!
                        See also "/tmp/QtCreator-RNTh55/qtc-cmake-XXTKyg1d/CMakeFiles/CMakeOutput.log".
                        See also "/tmp/QtCreator-RNTh55/qtc-cmake-XXTKyg1d/CMakeFiles/CMakeError.log".
                        *** cmake process exited with exit code 1.

                        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