zbar libraries and Qt5 application?



  • Hi all,

    has anybody compiled the zbar libraries and used them successfully with Qt5?

    I want to use the zbar libraries in my Qt5 application.
    Unfortunately zbar was written for Qt4.
    I found this: https://github.com/ZBar/ZBar/pull/8/files
    There are some changes mentioned that have to be done for customizing zbar for Qt5.
    But after all the changes in the zbar source code I can not longer build the libraries. 'make' gives me always erros.

    This is the output of 'make':

    Iqt -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtX11Extras   -I./include include/zbar/QZBar.h -o qt/moc_QZBar.cpp
    /bin/bash: Iqt: command not found
    make: [qt/moc_QZBar.cpp] Error 127 (ignored)
    Iqt -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtX11Extras   -I./include qt/QZBarThread.h -o qt/moc_QZBarThread.cpp
    /bin/bash: Iqt: command not found
    make: [qt/moc_QZBarThread.cpp] Error 127 (ignored)
    i -Itest -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtX11Extras   -I./include test/test_qt.cpp -o test/moc_test_qt.h
    /bin/bash: i: command not found
    make: [test/moc_test_qt.h] Error 127 (ignored)
    make  all-am
    make[1]: Entering directory `/home/me/Projects/zbar-0.10_qt5'
    cd . && /bin/bash /home/me/Projects/zbar-0.10_qt5/config/missing --run autoheader
    configure.ac:10: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
    config/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
    config/libtool.m4:4171: _LT_LINKER_SHLIBS is expanded from...
    config/libtool.m4:5246: _LT_LANG_C_CONFIG is expanded from...
    config/libtool.m4:138: _LT_SETUP is expanded from...
    config/libtool.m4:67: LT_INIT is expanded from...
    configure.ac:10: the top level
    configure.ac:10: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
    config/libtool.m4:4171: _LT_LINKER_SHLIBS is expanded from...
    config/libtool.m4:5246: _LT_LANG_C_CONFIG is expanded from...
    config/libtool.m4:138: _LT_SETUP is expanded from...
    config/libtool.m4:67: LT_INIT is expanded from...
    configure.ac:10: the top level
    configure.ac:67: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
    config/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
    config/libtool.m4:5353: _LT_LANG_CXX_CONFIG is expanded from...
    config/libtool.m4:785: _LT_LANG is expanded from...
    config/libtool.m4:768: LT_LANG is expanded from...
    configure.ac:67: the top level
    rm -f include/stamp-h1
    touch include/config.h.in
    cd . && /bin/bash ./config.status include/config.h
    config.status: creating include/config.h
    /bin/bash ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include  -I./zbar -I./include    -Wall -Wno-parentheses  -MT zbar/zbar_libzbar_la-config.lo -MD -MP -MF zbar/.deps/zbar_libzbar_la-config.Tpo -c -o zbar/zbar_libzbar_la-config.lo `test -f 'zbar/config.c' || echo './'`zbar/config.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./include -I./zbar -I./include -Wall -Wno-parentheses -MT zbar/zbar_libzbar_la-config.lo -MD -MP -MF zbar/.deps/zbar_libzbar_la-config.Tpo -c zbar/config.c  -fPIC -DPIC -o zbar/.libs/zbar_libzbar_la-config.o
    ...
    ...
    ...
    /bin/bash ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./include  -Iqt -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtX11Extras   -I./include  -Wall -Wno-parentheses -g -O2 -MT qt/qt_libzbarqt_la-QZBar.lo -MD -MP -MF qt/.deps/qt_libzbarqt_la-QZBar.Tpo -c -o qt/qt_libzbarqt_la-QZBar.lo `test -f 'qt/QZBar.cpp' || echo './'`qt/QZBar.cpp
    libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./include -Iqt -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtX11Extras -I./include -Wall -Wno-parentheses -g -O2 -MT qt/qt_libzbarqt_la-QZBar.lo -MD -MP -MF qt/.deps/qt_libzbarqt_la-QZBar.Tpo -c qt/QZBar.cpp  -fPIC -DPIC -o qt/.libs/qt_libzbarqt_la-QZBar.o
    libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./include -Iqt -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtX11Extras -I./include -Wall -Wno-parentheses -g -O2 -MT qt/qt_libzbarqt_la-QZBar.lo -MD -MP -MF qt/.deps/qt_libzbarqt_la-QZBar.Tpo -c qt/QZBar.cpp -o qt/qt_libzbarqt_la-QZBar.o >/dev/null 2>&1
    make[1]: *** [qt/qt_libzbarqt_la-QZBar.lo] Error 1
    make[1]: Leaving directory `/home/me/Projects/zbar-0.10_qt5'
    make: *** [all] Error 2
    

  • Moderators

    @MHermann said in zbar libraries and Qt5 application?:

    Iqt -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtX11Extras -I./include include/zbar/QZBar.h -o qt/moc_QZBar.cpp
    /bin/bash: Iqt: command not found

    Are you missing a - before Iqt?

    -Iqt
    

    Check the pro files.



  • @jsulm : zbar has no pro Files ...

    But in Makefile.in is written:

    @HAVE_QT_TRUE@qt_libzbarqt_la_CPPFLAGS = -Iqt $(QT_CFLAGS) $(AM_CPPFLAGS)
    

Log in to reply
 

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