Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issue with Log4Qt in Cross-Compilation Setup for BeagleBone Black
Qt 6.11 is out! See what's new in the release blog

Issue with Log4Qt in Cross-Compilation Setup for BeagleBone Black

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 258 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.
  • S Offline
    S Offline
    seqat
    wrote on last edited by
    #1

    Hello Qt Community, I’m currently working on a project where I’m cross-compiling Qt applications for a BeagleBone Black (BBB) using Ubuntu 20.04. I’ve integrated Log4Qt into my project but encountered some issues during the cross-compilation process. I’m new to the Qt platform so I might be missing something fundamental.

    Here’s a brief overview of my setup:

    Qt Version: 5.15.2
    Cross-Compiler: GCC Linaro 7.5.0 (using their sysroot 2.25, all folders in the home directory)
    Target Platform: BeagleBone Black (BBB)
    Operating System: Ubuntu 20.04

    Problem:
    When I try to build my project with Log4Qt, I get an error like this:

    /home/userProfile/qt-everywhere-src-5.15.2/Log4Qt/src/log4qt/helpers/initialisationhelper.h:24: error: log4qt/log4qtdefs.h: No such file or directory
    

    I’ve verified that Log4Qt is correctly configured and the necessary libraries are present, but I’m still facing problems.

    What I’ve Tried:

    • Cleaned and rebuilt the project

    • Tried static linking

    • Updated the project’s .pro file with the following changes:

    
    include(/home/userProfile/qt-everywhere-src-5.15.2/Log4Qt/src/log4qt/log4qt.pri)
    
    QT += network core
    QT += sql concurrent
    
    INCLUDEPATH += /include
    LIBS += -L/usr/lib -llog4qt
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    HEADERS += \
        mqttloggerbridge.h \
        loggermodule.h
    
    SOURCES += \
            loggermodule.cpp \
            mqttloggerbridge.cpp \
            main.cpp
    

    I would greatly appreciate any guidance or suggestions on how to resolve this issue. If additional information is needed, please let me know.

    Thank you in advance for your help!

    Best regards,

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

      I solved the issue by changing INCLUDEPATH += /include to INCLUDEPATH += /absolute/path/of/include for both INCLUDEPATH and LIBS.

      1 Reply Last reply
      0
      • S seqat has marked this topic as solved on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved