Solved 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,
most probably your program tries to call method from the library that cannot be loaded. (in this case: icui18n, as your error message states). -
Hi,
To add to my fellows, are you using an embedded build of Qt on your target ?
-
yes sir, i am trying to build our own custom OS with Qt and SDK for that,
-
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.
-
I am developing my build using Yocto , am using standard Qt not qt-embedded.
OS running file with sato theme , i can run qt demo apps ,
i am using qt 4.8.7, i have developed SDK for that using yocto.
-
Since you have a standard version of Qt on your target, why are you building your application with an Embedded version of Qt ?
-
@SGaist
No , I have cross compiled qt-everywhere-opensource-src-4.8.7 source for my target to build qt apps.I am not using qt Embedded ( libQtGuiE.so).
My target only have standard Qt lib in /usr/libs/libQt*so only.
-
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.
-
Ohh, Ok sir, Ill try without this option and let you know.
can you proved any configuration for cross compile standard Qt for arm
-
Sir,
If i try to cross compile with -embedded arm config,
i am getting below error,
../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:145:29: error: impossible constraint in 'asm'
: "memory"); -
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 ?
-
/opt/poky/2.0/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi
-