Error while loading shared libraries: libQt5Charts.so.5
-
Dear all,
this is my first topic in the forum, and I'm a newbee on Qt, so please forgive me if I'm doing somethig wrong. I read some other topic similar to my issue, here and in other sites on the web, but no one gave me a suitable solution.
I'm developing a Qt Widget application for linux embedded kit (imx0659). I'm using QTCreator 4.12.0 (QT 5.14.2), which matches the characteristics of the linux distro of the kit I own. I did not have big problems developing my app until now, but now, trying to add some Charts to the app, I have a problem.
Following documentation found in the web, I installed missing component QTChart (for Qt 4.12), I add QT += charts to my .pro file and I add code to link a simple QChart to a promoted QChartView.
The code I wrote compile well, but when I try to run the app on my embedded platform I have following error:
"error while loading shared libraries: libQtCharts.so.5: cannot open shared object file: No such file or directory"I tried to use some suggestion found on the web, like adding "QMAKE_LFLAGS += -Wl,-rpath,"'$$ORIGIN'", but did not solve. I also tried to play with export LD_LIBRARY_PATH.
I can see that in the /usr/lib of the compiler directory i have following files: libQtCharts.so (link), libQtCharts.so.5 (link), libQtCharts.so.5.10 (link), libQtCharts.so.5.10.1 (library file)Any help will be highly appreciated!
-
@MarcoChiesi79 said in Error while loading shared libraries: libQt5Charts.so.5:
QTCreator 4.12.0 (QT 5.14.2)
QTChart (for Qt 4.12)
Make sure that would be the 5.14.2 Qt version, not the 4.12 Creator version. Make sure this version of Qt Charts you have found matches the version of Qt used by everything else.
when I try to run the app on my embedded platform
It is the embedded run platform which needs that QtCharts shared library file. How does it get there? How do the other Qt libraries you use get there? (Note: I don't know about embedded, please don't shoot me if that does not use shared libraries and I don't know what I'm talking about.)
-
Dear JonB,
thank you for your reply. I made a mistake writing the topic, I installed QTChart for 5.14.2 (I just re-checked). But your answer is so precious because you made me realize that I did not focus my attention to the most important thing: if I add new component to QTCreator, I should probably perform a new bitbake to include the needed library in the embedded platform.
I will work on this and then report here, to eventually set the topic as solved. -
@MarcoChiesi79 said in Error while loading shared libraries: libQt5Charts.so.5:
Dear JonB,
thank you for your reply. I made a mistake writing the topic, I installed QTChart for 5.14.2 (I just re-checked). But your answer is so precious because you made me realize that I did not focus my attention to the most important thing: if I add new component to QTCreator, I should probably perform a new bitbake to include the needed library in the embedded platform.
I will work on this and then report here, to eventually set the topic as solved.Ok, I can confirm that new bitbake was needed. Thank you JonB
-
@MarcoChiesi79 Even though this ones quite old: Would you mind explaining how exactly to include the library and perform the new bitbake?
This would help me and maybe others having your exact issue.