Build Project with QtSerialPort - qt

I want to build a project wich is using QtSerialPort. I'm using Qt 5.2.1 and Ubuntu 14.04.2 LTS. So, I have not to download QtSerialPort (?) See the news from 2013-07-03 here.
I'm creating a Makefile with cmake, which works. If I execute make, I got this error:
fatal error: private/qringbuffer_p.h: No such file or directory.
I have no idea what I have to do. Maybe it is a problem between Qt4 and Qt5?
If I clone the mirror as described here under Gettig the source code I can't execute the command
git checkout qt5.2.1

Related

Cannot find serial port support in Qt 6.3.2

For some reason I should use Qt6 for my project. I need serial port functionality but Qt Creator cannot find corresponding module. The following error is raised:
Project ERROR: Unknown module(s) in QT: serialport. My .pro file includes serialport - it seems to me that the problem is in the absence of this module. Also I don't corresponding examples projects.
I tried to install libqt5serialport5 and libqt5serialport5-dev using commands:
sudo apt-get install libqt5serialport5
sudo apt-get install libqt5serialport5-dev
but it didn't help. Please explain how to add serial port module to my Qt6 installation.
Below is information about my installation:
Qt Creator 8.0.2
Based on Qt 6.3.2 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64)
This problem has been solved very simple. Use Qt MaintenanceTool using which allows remove/update or install modules.

Qt-default version issue on migration from RPi4 to NVIDIA Jetson Nano

Having an issue on migrating a Qt project from RPi4 to NVIDIA Jetson Nano. We wanted to migrate our project to Jetson Nano to improve image processing performance.
The qt dependency of our project is >= 5.11. But Jetson Nano uses Ubuntu 18.04.4 and it has qt5-default package pre-installed in it (in my understanding some system files use it). And this qt5-default packages version is 5.9.5.
I tried to downgrade my qt dependency, but every change made lead to harder to fix issue.
I tried to upgrade default qt5 version but couldn't find any similar guidance. The guides/questions already exists are about x86 etc. environment. Couldn't find any ARM based solution. The qt downloads doesn't give any buildable for ARM env (or I can't find them). The official documents only talks about cross-compiling.
What should I do to overcome this issue? Thanks in advance.
Okay I finally was able to successfully compile QT 5.12.9 on the Nano itself (no cross compilation).
The steps I did:
git clone https://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.12.9
Then
git submodule update --init --recursive
cd ~
mkdir qt5-build
cd qt5-build
Configure and build
../qt5/configure -nomake examples -nomake tests -skip qtwebengine
make
sudo make install
Make took like nearly a whole day to compile all sources. Also I had some compilation errors before. However after skipping webengine and not building the tests and examples in ./configure I was finally able to sucessfully make it.

Could not start process "make" qmake_all

17:48:22: Could not start process "make" qmake_all
Error while building/deploying project Calculator (kit: Desktop Qt 5.10.0 GCC 64bit)
When executing step "qmake"
My project can't run on Ubuntu
my kit: Desktop Qt 5.10.0 GCC 64bit
I am a newbie to Linux OS so how can I do
In terminal:
sudo apt-get install build-essential
If you get Cannot find -lGL error, try this:
sudo apt-get install libgl1-mesa-dev
Sometimes this happens due to incorrect path in the build settings.Qt creator shows this path in red in the project settings tab.
You can either give a correct path as the build directory (Which then will be shown in black) or deselect the shadow build checkbox to resolve the error.
To access build settings click the project icon on the left pane.
this image will show how qt creator shows the incorrect path
This can also happen on Windows if you are using something like MSYS2 and its Qt/GCC builds. Finding where make is in MSYS2 shell ($whereis make) and adding to PATH does fix it. (Must restart Qt creator)

Why is there no qmake-qt5 included in the qt5-default package

I installed qt5-default on my Odroid XU3 using the the sudo apt-get install qt5-default command and wanted to run qmake-qt5 using the terminal but it printed that this command is unknown. Then I looked in the usr/share/qt5 folder and noticed that there is only the doc-foder inside. I also looked in the usr/bin folder and could only find qmake-qt4 but no qmake-qt5. When I run the install command, I also read that some libraries will be installed, so I think, libraries are not the problem.
Next I tried to install qmake-q5t manually from this page https://launchpad.net/ubuntu/trusty/+package/qt5-qmake but then I got a message that there is a newer version of qmake-qt5 already installed. I searched the whole system using the find command for qmake-qt5 but couldn't detect it.
Last I also tried to add the ubuntu-sdk ppa using as described here https://askubuntu.com/questions/279421/how-can-i-install-qt-5-x-on-12-04-lts but this also didn't work out.
Does it have something to do with my Odroid or with Lubuntu? Is there any other way to install qmake-qt5?
I tried to compile and make with the already installed qt4 and this did work out using
qmake-qt4 -project
qmake-qt4
make
./helloworld
I want do the same but only with qt5
Thanks in advance
The qmake executable is installed in /usr/lib/<your_arch>/qt5/bin as qmake (no -qt5 suffix).
You can check with qmake --version, it should report you a Qt version 5.x.x

in ubuntu 12.04 make cannot find Qt libraries

When I run make (after running qmake) I get the following error:
/usr/bin/ld: cannot find -lQtGui
/usr/bin/ld: cannot find -lQtCore
In synaptic it shows that I have installed libqtcore4 and libqtgui4.
There is no such directory as /usr/bin/ld.
Basically, I've installed the QtSDK, and QtCreator seems to work fine in that it can build the hello world program. But I want to be able to work from the CLI and run make. I suspect that I may need to redirect the make program to look elsewhere for QtGui and QtCore. If so, how do I find out where those libraries are? I'm running Ubuntu 12.04 and I've followed the advice of this page http://www.qtforum.org/article/28081/installing-qt-4-5-2-on-linux.html down to the last section where it talks about libraries. Any suggestions?
Install Qt using apt-get
sudo apt-get install libqt4-core libqt4-gui
or if you want everything
sudo apt-get install libqt4-*
The advice at http://www.qtforum.org/article/28081/installing-qt-4-5-2-on-linux.html is outdated and useless in your case since you have a recent version of Ubuntu. It leads to having two different versions of Qt side by side, which is technically possible but hard to manage.
You should install the qtcreator Ubuntu package and just delete the /opt/qtsdk... directory and undo the modifications suggested by the outdated instructions. It is essential that your PATH is not tweaked so that it's the Ubuntu version of qmake that is found when called from the command line.
If you still have compilation problems after that, they're likely to be solved by installing more packages, such as libqt4-dev or others Qt-related packages.
Also, /usr/bin/ld is not a directory, it's the linker program.

Resources