Cross Compiling: No binaries on pi image



  • 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?


  • Lifetime Qt Champion

    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 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!



  • 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 !


  • Lifetime Qt Champion

    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 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.


  • Lifetime Qt Champion

    Did you re-run qmake after adding that ?

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



  • Yes, did both. It keeps behaving like that.


  • Lifetime Qt Champion

    Can you post your pro file content ?



  • @#-------------------------------------------------

    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.


  • Lifetime Qt Champion

    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 ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.