Unable to compile Qt5 examples. QCommandParser not found - qt5

I wanted to try out Qt5 with it's creator. I wanted to start with examples, so I installed some packages (with apt, also qtcreator package but issued the same with online-installer).
I am finally able to open examples, but those does not work.
I've tried to find every possible packages of qt in apt that may correspond to examples. Also tried to find package containing corresponding file (https://packages.ubuntu.com/search?searchon=contents&keywords=qcommandlineparser&mode=exactfilename&suite=disco&arch=any). It finds qtbase5-gles-dev, but I cannot install it since it wants me to uninstall a lot of software I need.
#include <QCommandLineParser>
#include <QCommandLineOption>
Both QCommandLineParser and Option are "file not found".
I'm on Kubuntu 19.04 and Qt Creator 4.8.1 based on Qt 5.12.2 (GCC 8.3.0, 64 bit)

According to this, I was running Qt kit as Qt4 not Qt5:
https://askubuntu.com/questions/916295/building-a-pro-in-qtcreator-gives-qtwidgets-no-such-file-or-directory
It is possible that the default qt build Kit has been set to qt 4.x rather than qt 5.x when qtcreator was installed. To update this;
qtcreator - options - build & run - Kits - Manual - Desktop (default)
- Qt version
Change Qt version from qt 4.x.. to qt 5.x.. in PATH (qt5).
Helped with delay...

Related

Making the CMAKE path available to another software

I am trying to install a software package called kinsol, a non-linear equation solver, through ccmake as instructed in its documentation. The package requires a cmake version 3.12 or higher. So, I installed 3.17.3. Now, the problem is that my kinsol installation process is not able to locate ccmake and hence gives the message "ccmake ../kinsol-6.2.0
The program 'ccmake' is currently not installed. You can install it by typing:
sudo apt install cmake-curses-gui". But using the aforementioned command installs the version 3.5, which again fails in the task due to the version requirement of kinsol. I had come across a similar question in this forum and so I followed the workarounds suggested there as in putting the installation path of cmake in the .bashrc file still without any success. Does anyone know how to make the path of cmake known to the software?
Thanks,
DP

QT5: QTQuick.Controls version 2.12 is not found

My Qt application is failing to start with the following error:
module "QtQuick.Controls" version 2.12 is not installed
My platform is Ubuntu 20.04.2 LTS. This is a well-known error on StackOverflow. Unfortunately, no answers have worked for me this far. I have exhausted all suggested remedies without any improvement. These are enumerated below:
Checking compatibility of Qt with QuickControls: I am using Qt 5.12.8 in QtCreator, and QtCreator 4.11.0. I installed Qt using sudo apt install qt5 default and sudo apt-get install qtcreator. According to the documentation (see here, Qt 5.12 is directly compatible with QtQuick 2.12:
Checking if I specified QtQuick as a dependency: In my .pro file, I have added QT += quick qml quickcontrols2
Checking if I have the right libraries: I have qtquickcontrols2-5-dev, qt5declarative5-dev, and qml-module-qtquick-controls. Furthermore, apt-cache search qtquick shows me that all the qtquick modules are there
Re-installing qtcreator: Some questions suggest re-installing QtCreator. I have tried this, but it had no effect
QML Emulation layer: I have configured my project to "Use QML emulation layer that is built with the selected Qt". However, this also had no effect
Having performed every one of these steps, and exhausted all StackOverflow questions and Github threads related to the topic, I still cannot find what is causing this issue.
I have additionally included some related questions that I've tried. Question 4 is perhaps the closest to mine, but was solved via the Yocto build system that I am not using:
import QtQuick.Controls 2.1 QML MODULE NOT FOUND
Error module "QtQuick" version 2.12 is not installed
Ubuntu QT install qt quick controls 2.1
Qt - Module "QtQuick.Controls" is not installed
I would be extremely appreciative of any advice on further resolving this matter.
You are missing the qml module for controls 2 because you have installed qml-module-qtquick-controls instead of qml-module-qtquick-controls2.
The QML engine will look for a module inside the path from QML2_IMPORT_PATH, by following the namespaces, so in this case QML2_IMPORT_PATH/QtQuick/Controls and QML2_IMPORT_PATH/QtQuick/Controls.2 (see version semantics documentation ). If in these folders it finds a qmldir file, it will parse it and look for any component that has at least 2 as major and something lower or equal to 12 as minor (allthough this particular qmldir doesn't state any components... it probably also reads the libqtquickcontrols2plugin.so or plugin.qmltypes)

Latest CMake and LLVM on Windows 10

All
latest LLVM is 7.0 and it is working quite well on Windows 10 x64, building native executables etc.
latest CMake is 3.12.x.
I have VS 2017 Pro installed as well.
Downloaded them both and tried to make simple project with it on Windows, and it didn't work, even if I set CC/CXX, linker pointing to lld, failing on compiling test problem, not finding rc (resource compiler).
Tried targeting GNU make as well as Ninja as build system.
Is this a supported configuration? If yes, how to make it work?
Basically, I would like to use CMake/LLVM with editor/terminal like I'm doing it on Linux
Run CMake from Developer Command Prompt.
That should make rc available in your PATH, and then CMake should be able to find it.

Installing latest cmake version using cygwin for clion

I have recently installed cmake for my Clion project, using Cygwin. Its version was 3.10 but I had some troubles with Conan packet manager, and I have been adviced to upgrade cmake to version 3.11.
As cygwin didn't provide this version, I tried to install it "by hand", but it failed. So I unistalled cmake, and tried to download it again from Cygwin.
For some reason, Cygwin only provides me version 3.6.2. I don't understand why.
However, I would like to know how to install the lastest version of cmake using Cygwin?
I am working on Windows 10.
Thanks in advance.
cygwin cmake last version is 3.6.2
https://cygwin.com/packages/x86_64/cmake/
If you were using the 3.10, it was not the cygwin package.
If you want to use it in cygwin you have two choice:
- build it by yourself
- ask the cygwin package maintainer (but he seems not very active recently)

Cant install WXWidgets in Ubuntu 16.06

cant install WXWidgets from source (wxwidgets3.0-3.0.2.orig)
After configure which apparently runs without errors:
config.status: executing wx-config commands
Configured wxWidgets 3.0.2 for `x86_64-unknown-linux-gnu'
Which GUI toolkit should wxWidgets use? GTK+ 2 with support for GTK+ printing libnotify
Should wxWidgets be compiled into single library? no
Should wxWidgets be linked as a shared library? yes
Should wxWidgets support Unicode? yes (using wchar_t)
What level of wxWidgets compatibility should be enabled?
wxWidgets 2.6 no
wxWidgets 2.8 yes
Which libraries should wxWidgets use?
STL no
jpeg builtin
png sys
regex builtin
tiff builtin
zlib sys
expat sys
libmspack no
sdl no
at Make I get this after a few lines:
ranlib /home/sem/Downloads/wxwidgets3.0-3.0.2.orig/lib/libwxregexu-3.0.a
make: *** No rule to make target 'src/jpeg/jcomapi.c', needed by 'wxjpeg_jcomapi.o'. Stop.
I don't know what is wxwidgets3.0-3.0.2.orig, but this is not how the distribution archives are called, so it looks like you've got the file from which Ubuntu packages are built which doesn't seem to include the sources for 3rd party libraries such as libjpeg, presumably because these libraries are supposed to be already installed.
So you need to either install all the dependencies (you would find them in the debian/control file of the Ubuntu package) or get the really original sources from https://github.com/wxWidgets/wxWidgets/releases/v3.0.3 (there is no reason to use 3.0.2 when 3.0.3 is out).