Unsolved wrong library or version mismatch when opening QSerialPort
-
@douglas How did you add serial port module? How did you install it? Is it same version as other Qt modules?
-
@jsulm
I did not specify this (if it can be useful): I am cross-compiling for my device.
Browsing the target device, I can see the following libraries under /usr/lib:
so I suppose the serialport module version is the 5.9, right?
In my kit, the Qt version displayed is 5.7.1, so it seems to be different from the serialport module. Can this be the problem?To include the serialport module in my project, I added "QT += serialport" to my .pro file.
Am I missing something?
Thank you. -
@douglas One moment. When you get that error - do you build/execute for your host machine or target device? Is your app going to run on a PC or on the target device?
-
@jsulm My application should run onto the target device (i.MX 6UL processor), not on the Ubuntu PC.
That error came out when I try either to run the application directly from my target device and from the QtCreator Debugger.
The GUI doesn't appear on the device display, and the Application output console shows that error. -
-
@jsulm is it possible that commands gives me:
sh: ldd: command not found
?
My executable file has not .exe estension. -
@douglas I didn't say it has .exe extension. YOUR_EXE_FILE is simply a placeholder for the name of your executable file as I don't know it.
Another question: do you use same Qt version to build your app and to execute it on your target? On your target you have Qt 5.9.2 but you said on your PC you have 5.7.1 right? If it is the case you need to make sure you use exactly the same Qt version. -
@jsulm said in wrong library or version mismatch whel opening QSerialPort:
Another question: do you use same Qt version to build your app and to execute it on your target? On your target you have Qt 5.9.2 but you said on your PC you have 5.7.1 right?
Yes, it seems to be right. How can I align the libraries version?
Thank you! -
@douglas you need to copy all new libraries and their dependencies to your target, overwriting the existing ones
-
@douglas Take a look at http://doc.qt.io/qt-5/linux-deployment.html
And the question is: which version do you actually want to use?