Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to Build qt object file statically in linux
Forum Update on Monday, May 27th 2025

How to Build qt object file statically in linux

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 3 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.
  • A Offline
    A Offline
    arjun kumar
    wrote on 6 Sept 2023, 05:24 last edited by
    #1

    please help me all qt family
    i have created a simple gui application using qt platform
    and i have create two file one is main.cpp and other file is project.pro file so i have run qmake command to build the qt project code . its give output object file

    i have run this object file in my linux system ,its run perfectly
    i have no idea to how to run this object file in my embedded board
    i have try to find many solutions but my problem is not solve
    i have requested to all qt family to solve this problem

    i have written my sequence how to run this file in my linux system

     i have two file main.cpp and project.pro
    

    $ qmake project.pro

    this command create a makefile to run make command
    and i have run make file
    $ make

    develop my qt object file
    but this file is dynamically linked
    but i need statically linked

    J 1 Reply Last reply 6 Sept 2023, 05:27
    0
    • A arjun kumar
      6 Sept 2023, 05:24

      please help me all qt family
      i have created a simple gui application using qt platform
      and i have create two file one is main.cpp and other file is project.pro file so i have run qmake command to build the qt project code . its give output object file

      i have run this object file in my linux system ,its run perfectly
      i have no idea to how to run this object file in my embedded board
      i have try to find many solutions but my problem is not solve
      i have requested to all qt family to solve this problem

      i have written my sequence how to run this file in my linux system

       i have two file main.cpp and project.pro
      

      $ qmake project.pro

      this command create a makefile to run make command
      and i have run make file
      $ make

      develop my qt object file
      but this file is dynamically linked
      but i need statically linked

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 6 Sept 2023, 05:27 last edited by
      #2

      @arjun-kumar said in How to Build qt object file statically in linux:

      i have no idea to how to run this object file in my embedded board

      You would usually cross compile the application on your host machine for the target machine. But you do not provide much information.

      If you really want to do static build (most probably you will still have to cross compile!) you will also have to build Qt statically.

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

      A 1 Reply Last reply 6 Sept 2023, 05:36
      1
      • J jsulm
        6 Sept 2023, 05:27

        @arjun-kumar said in How to Build qt object file statically in linux:

        i have no idea to how to run this object file in my embedded board

        You would usually cross compile the application on your host machine for the target machine. But you do not provide much information.

        If you really want to do static build (most probably you will still have to cross compile!) you will also have to build Qt statically.

        A Offline
        A Offline
        arjun kumar
        wrote on 6 Sept 2023, 05:36 last edited by
        #3

        @jsulm how to cross compile
        can you give me brief how to cross compilation of qt project binary file linux into embedded system
        i have compile this qt project in linux system
        can you give me idea about it

        J 1 Reply Last reply 6 Sept 2023, 05:37
        0
        • A arjun kumar
          6 Sept 2023, 05:36

          @jsulm how to cross compile
          can you give me brief how to cross compilation of qt project binary file linux into embedded system
          i have compile this qt project in linux system
          can you give me idea about it

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 6 Sept 2023, 05:37 last edited by
          #4

          @arjun-kumar I don't have exact information for your target device as you do not say anything about it.
          You can see how this is done for RaspberryPi here: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi

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

          A 1 Reply Last reply 6 Sept 2023, 05:49
          0
          • J jsulm
            6 Sept 2023, 05:37

            @arjun-kumar I don't have exact information for your target device as you do not say anything about it.
            You can see how this is done for RaspberryPi here: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi

            A Offline
            A Offline
            arjun kumar
            wrote on 6 Sept 2023, 05:49 last edited by
            #5

            @jsulm i have used imx6ul embedded board

            I want to know that my qt project has been compiled in Linux and an object file has been generated which is dynamic linked but I need to make this object file statically linked and put it in the board.

            J S 2 Replies Last reply 6 Sept 2023, 05:52
            0
            • A arjun kumar
              6 Sept 2023, 05:49

              @jsulm i have used imx6ul embedded board

              I want to know that my qt project has been compiled in Linux and an object file has been generated which is dynamic linked but I need to make this object file statically linked and put it in the board.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 6 Sept 2023, 05:52 last edited by
              #6

              @arjun-kumar I don't have to add anything more. As I already wrote: you have to cross compile your app for your target device.
              If you enter "imx6ul cross compilation" in Google you will find many links describing how to do this.

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

              1 Reply Last reply
              2
              • A arjun kumar
                6 Sept 2023, 05:49

                @jsulm i have used imx6ul embedded board

                I want to know that my qt project has been compiled in Linux and an object file has been generated which is dynamic linked but I need to make this object file statically linked and put it in the board.

                S Offline
                S Offline
                SimonSchroeder
                wrote on 7 Sept 2023, 07:15 last edited by
                #7

                @arjun-kumar said in How to Build qt object file statically in linux:

                i have used imx6ul embedded board

                Well, it doesn't look like it is one of the officially supported platforms: https://doc.qt.io/qt-6/supported-platforms.html#support-levels-for-target-hardware

                Are you running a regular Linux distribution on the embedded platform? Otherwise you have to use boot to Qt (which I don't know anything about). In any case you need to cross compile Qt yourself as well, not just your own application.

                1 Reply Last reply
                0

                1/7

                6 Sept 2023, 05:24

                • 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