Unsolved Qt compile error : glib/galloca.h not found in glib-2.0/glib.h
-
I've the following error during Qt compiling phase :
In file included from ../test_ble2/main.cpp:12: /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0/glib.h:30:10: fatal error: glib/galloca.h: No such file or directory 30 | #include <glib/galloca.h>
compilation terminated. make: *** [Makefile:723: main.o] Error 1
looking for *.h and I found it on the board so the problem seems in *.pro file :
QT += quick LIBS += -lbluetooth LIBS += -lpython3 LIBS += -llibglib-2.0 SOURCES += \ main.cpp RESOURCES += qml.qrc QML_IMPORT_PATH = QML_DESIGNER_IMPORT_PATH = qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target packagesExist(glib-2.0) { CONFIG += link_pkgconfig PKGCONFIG += glib-2.0 } HEADERS += \ include/gattlib.h unix:!macx: LIBS += -L$$PWD/lib/ -lgattlib INCLUDEPATH += $$PWD/include DEPENDPATH += $$PWD/include
but I' dont fix it, any suggestion?
The platform is yocto for imx8.
Any suggestion? Thanks in advance
-
Hi,
Check the exact path where that file can be found and then update INCLUDEPATH to contain it as well. There might something like "some_path/glib-2.0/include" missing.
-
Hello,
I've checked and ...galloca.h is under :
/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0/glib/
so in *.pro file I've added
INCLUDEPATH += /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0/glib/
but the build fail again
-
@Ratataplam glib/galloca.h is not found, so you have to add /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0
-
@jsulm said in Qt compile error : glib/galloca.h not found in glib-2.0/glib.h:
/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0
Thanks ! Solved