Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. Cross Compiling: No binaries on pi image
Forum Update on Monday, May 27th 2025

Cross Compiling: No binaries on pi image

Scheduled Pinned Locked Moved QtonPi
11 Posts 2 Posters 3.1k 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.
  • R Offline
    R Offline
    Ruken
    wrote on last edited by
    #1

    Hello,

    I've followed the Cross Compiling tutorial on ICS, everything seems to compile fine (using the gnueabihf compiler from raspberry/tools). But after compilation finished and installing everything, there is no 'bin' folder on the pi image. There is only a lib folder. When configuring, i had to remove the -reduce-relocations flag, because otherwise i had an error about symbolic function binding being broken or w/e. So, what am I actually doing wrong? I did everything according to the guide.

    Compiling on Arch Linux (x64), 32libs installed of course (and also using the 32bit compiler).

    Edit:
    Another strange thing I noticed: On my workstation, it creates a bin folder with all binaries. I can execute them on my workstation, thats not how it is supposed to be, is it?

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

      Hi and welcome to devnet,

      Yes it's supposed to be like that. qmake and friends are host tools, so unless you want to do native build it wouldn't make any sense to have them on your Pi.

      Hope it helps

      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
      • R Offline
        R Offline
        Ruken
        wrote on last edited by
        #3

        [quote author="SGaist" date="1409775968"]Hi and welcome to devnet,

        Yes it's supposed to be like that. qmake and friends are host tools, so unless you want to do native build it wouldn't make any sense to have them on your Pi.

        Hope it helps[/quote]

        That actually makes sense. Must look like im stupid as hell. I thought that I would have to build stuff on the pi. Will test it when I get home. Thanks for that quick reply!

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Ruken
          wrote on last edited by
          #4

          Sorry for double posting, but now when I try to compile it (qmake -project, qmake, make), make fails and says that it can't find QMainWindow. (#include <QMainWindow>).

          Edit (again):
          I've manually fixed it by adding include dirs to QtWidget in the makefile. Is there any way of automatically doing that with qmake (otherwise im going to just link it)?
          It runs fine on my Pi now !

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

            Don't worry for your look, the question is not stupid.

            I'd say you come from Qt 4, no ?

            You need to add

            @
            QT += widgets
            @

            to your pro file in order to use QWidget and friends in Qt 5. They have their own module now.

            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
            • R Offline
              R Offline
              Ruken
              wrote on last edited by
              #6

              [quote author="SGaist" date="1409782240"]Don't worry for your look, the question is not stupid.

              I'd say you come from Qt 4, no ?

              You need to add

              @
              QT += widgets
              @

              to your pro file in order to use QWidget and friends in Qt 5. They have their own module now.[/quote]

              My project file contains that (and also network), but its still not in the makefile. I manually have to add the include dir and also link Qt5Widgets and Qt5Network.

              Btw, this is my first time using qt.

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

                Did you re-run qmake after adding that ?

                Also, did you check that you are using the correct qmake version ?

                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
                • R Offline
                  R Offline
                  Ruken
                  wrote on last edited by
                  #8

                  Yes, did both. It keeps behaving like that.

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

                    Can you post your pro file content ?

                    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
                    • R Offline
                      R Offline
                      Ruken
                      wrote on last edited by
                      #10

                      @#-------------------------------------------------

                      Project created by QtCreator 2014-08-29T18:41:08

                      #-------------------------------------------------

                      QT += core gui
                      QT += network
                      QT += widgets

                      TARGET = RPi_MainUI
                      TEMPLATE = app
                      DESTDIR = $$PWD

                      CXX=$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc
                      CC=$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc

                      SOURCES += main.cpp
                      rpi_mainui.cpp
                      timewidget.cpp
                      weatherwidget.cpp
                      utility.cpp
                      WeatherRecord.cpp

                      HEADERS += rpi_mainui.h
                      timewidget.h
                      weatherwidget.h
                      utility.h
                      General.h
                      WeatherRecord.h

                      FORMS += rpi_mainui.ui
                      timewidget.ui
                      weatherwidget.ui@

                      Here you go.

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

                        If you are setting both CXX and CC then there's something wrong with your setup. Are you sure you are using the correct kit ? The correct Qt version ?

                        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