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. Qmake library path for arm project
Forum Updated to NodeBB v4.3 + New Features

Qmake library path for arm project

Scheduled Pinned Locked Moved Qt Creator and other tools
10 Posts 3 Posters 3.8k Views 2 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
    user100
    wrote on last edited by
    #1

    I'm using qmake 2.01a and Qt 4.8.4 on a x86 Linux host. I'm having an issue unsetting the default library path when making a bin for an arm target.

    qmake adds -L/usr/lib/i386-linux-gnu to the link command even if I override it using LIBS = in the .pro

    I also was not able to remove the default qmake -unset QT_INSTALL_LIBS

    Below is part of my .pro project file.

    LIBS = -L/arm/libs

    QMAKE_CC = /arm/gcc-arm-none-eabi/bin/arm-none-eabi-gcc
    QMAKE_CXX = /arm/gcc-arm-none-eabi/bin/arm-none-eabi-g++
    QMAKE_LINK = /arm/gcc-arm-none-eabi/bin/arm-none-eabi-ld
    QMAKE_AR_CMD = /arm/gcc-arm-none-eabi/bin/arm-none-eabi-ar

    QMAKE_CFLAGS_DEBUG += -std=c99
    QMAKE_CFLAGS_RELEASE += -std=c99

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Are you trying to cross-compile your application using your x86 Qt qmake ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • U Offline
        U Offline
        user100
        wrote on last edited by
        #3

        Yes, I'm trying to build a binary for an arm Cortex device and running the development environment on x86 Mint.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Did you first cross-compile Qt ?

          Without that you won't be able to cross-compile your application. Using your x86 qmake won't allow you to build an ARM application, you have to use the one from the ARM Qt

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • U Offline
            U Offline
            user100
            wrote on last edited by
            #5

            I'm confused. qmake has dependencies on Qt?

            My target application won't have any dependancies on Qt.

            qmake seems to work fine other than I can't get it to drop the reference to /usr/lib/i386-linux-gnu when linking.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Indeed it has, qmake is the first thing built when building Qt.

              It's because you are using your system qmake which is configured to use your system build tools.

              You would at least need to tell it which mkspec to use (however I can't guarantee that i'll work without a glitch since I have always used qmake from my cross-compiled Qt when working on ARM code)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • U Offline
                U Offline
                user100
                wrote on last edited by
                #7

                I don't understand why paths would be compiled into qmake, doesn't that make it much less flexible?

                It seems I may not be able to used qmake

                Thanks for your help.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  AFAIK it's so because then you don't need to mess around with your system to build a Qt project. But you can modify the paths qmake uses using e.g. qt.conf.

                  However you didn't answer my question: did you already cross-compile Qt ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    Haresh
                    wrote on last edited by
                    #9

                    Can you please explain procedure to cross compile QT4.8 for arm.????

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Hi and welcome to devnet,

                      There's already explanations in Qt's documentation. Note that ARM is a processor architecture. Depending on what target board you are using, little things might change.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - 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