Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cross compile Qt application
Forum Updated to NodeBB v4.3 + New Features

Cross compile Qt application

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 1.6k Views 1 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.
  • M Offline
    M Offline
    marlon.smith10
    wrote on last edited by
    #1

    Hi everyone,

    I have a desktop computer running Ubuntu with all of the Qt dev tools installed from the repositories. I also have an i.MX6 board running Ubuntu, and I've installed the Qt libraries using the repositories on that board as well.

    If I build an application on the i.MX6, there are no problems. What I'd like to do is build the application on my desktop and copy the binary onto the i.MX6. I've created a copy of the i.MX6's filesystem on my desktop so I can link against the libraries, and I've installed arm-linux-gnueabihf-g++ and created a qmake.conf file, but I'm getting errors when trying to build the project:

    ../../i.MX6/filesystem/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
    #include <bits/predefs.h>
    ^
    compilation terminated.
    make: *** [main.o] Error 1

    Here's the qmake.conf that I'm using:

    #qmake configuration for building with arm-linux-gnueabihf-g++

    MAKEFILE_GENERATOR = UNIX
    TARGET_PLATFORM = unix
    TEMPLATE = app
    CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
    QT += core gui
    QMAKE_INCREMENTAL_STYLE = sublib

    include(../common/linux.conf)
    include(../common/gcc-base-unix.conf)
    include(../common/g++-unix.conf)

    #modifications to g++.conf
    QMAKE_CC = arm-linux-gnueabhfi-gcc
    QMAKE_CXX = arm-linux-gnueabihf-g++
    QMAKE_LINK = arm-linux-gnueabihf-g++
    QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++

    #modifications to linux.conf
    QMAKE_AR = arm-linux-gnueabihf-ar cr
    QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy
    QMAKE_STRIP = arm-linux-gnueabihf-strip

    QMAKE_LFLAGS_RELEASE = -Wl,-O1,-rpath /home/marlon/i.MX6/filesystem/usr/lib
    QMAKE_INCDIR = /home/marlon/i.MX6/filesystem/usr/include
    QMAKE_LIBDIR = /home/marlon/i.MX6/filesystem/usr/lib

    load(qt_config)

    Can anyone help me out with this?

    Thanks

    Marlon

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sidii
      wrote on last edited by
      #2

      Hi, i also encountered the same error sometime back, in fact i encountered many other errors also. Downloading the latest stable version of the QT source code resolved all my issues.

      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