undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent
-
Hi,
I am using qt 4.8.7 in my target , i tried to port my qt application on it, i am getting below mentioned error.
root@beaglebone:~# ./sample
Unable to load library icui18n "Cannot load library icui18n: (icui18n: cannot open shared object file: No such file or directory)"
./sample: symbol lookup error: ./sample: undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent
I don't know why, please help if anyone faced the same issue before.
-
@Sarath-AK said in undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent:
./sample: symbol lookup error: ./sample: undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent
Without deeper knowlegde to the topic, the error has something to do with http://doc.qt.io/qt-4.8/qwidget.html#qwsEvent
Have you overwritten this virtual function in your code?
-
Hi,
To add to my fellows, are you using an embedded build of Qt on your target ?
-
Where does that custom OS come from ?
Because from the looks of it, you have a standard Qt build on your target while you are using an Embedded build to compile your application.
-
Since you have a standard version of Qt on your target, why are you building your application with an Embedded version of Qt ?
-
What options did you pass when you cross-compiled Qt ?
-
.configure -confirm-license -prefix /opt/qt_4_8_7 -opensource -nomake examples -nomake tests -xplatform qws/linux-arm-sarath-g++ -platform linux-g++ -shared -embedded arm -sysroot /opt/poky/2.0/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi -qt3support -fast -qt-libpng -qt-libjpeg -openssl -openssl-linked -reduce-exports
-
There it is:
-embedded arm
You are in fact cross-compiling an Embedded version of Qt.
-
IIRC, you have to pass the
-arch
option. -
On a side note, please avoid the use of the qt3support module in your code. It was only meant as a temporary help to port old code bases.
-
for this config,
./configure -confirm-license -prefix /opt/qt_4_8_7 -opensource -nomake examples -nomake tests -xplatform qws/linux-arm-sarath-g++ -platform linux-g++ -shared -sysroot /opt/poky/2.0/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi -arch arm -fast -reduce-exports -no-qt3support
am getting,
In file included from ../../include/QtGui/private/qt_x11_p.h:1:0,
from kernel/qapplication.cpp:82:
../../include/QtGui/private/../../../src/gui/kernel/qt_x11_p.h:151:41: fatal error: X11/extensions/Xinerama.h: No such file or directory
compilation terminated./Xinerama.h this file present in my sysroot and ,
i have added this things in my my qmake.conf file,
QMAKE_CFLAGS += -O3 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8
QMAKE_CXXFLAGS += -O3 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8
QMAKE_INCDIR_QT = /opt/poky/2.0/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/include
QMAKE_LIBDIR_QT = /opt/poky/2.0/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/usr/lib -
Where exactly in your sysroot ?