Error: The deployment target requir Qt libs, but init qmake is failed. (CQtDeployer) - qt

i am try to use CQtDeployer.
I am using ubuntu 18.04 and QT 5.9.5.
I want to run this on terminal:
cqtdeployer -bin MY_APP_NAME_IN_RELEASE_FOLDER -qmake /usr/lib/qt5/bin/qmake
Note:
/usr/lib/qt5/bin/qmake -> FROM QT CREATOR -> options -> qt versions -> autodetected qt 5.9.5 -> qmake locations
Result:
Info: Deploy ...
Info: flag targetDir not used. use default target dir :/root/Masaüstü/RELEASE/DistributionKit
Error: The deployment target requir Qt libs, but init qmake is failed.
Error: deploy is failed!
Note2:
root#ubuntu-pc:~/DEPLOY_TEST_1# qmake --version
QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu
What's the problem?

And the solution:
Blockquote
Solution 1
As a workaround, uninstall the snap version of cqtdeployer and install cqtdeployer from the installer.
Solution 2
Install Qt from an official source in user space.
If you are unable to use the GUI, use the console utility to install Qt
Blockquote
Solution from : https://github.com/QuasarApp/CQtDeployer/issues/373#issuecomment-637762214

Related

All Qt classes are highlighted with messages "Use of undeclared identifier" (Qt Creator from Xubuntu 20.04 repo)

I installed Qt Creator from XUbuntu 20.04 repository using these commands:
sudo apt install qt5-default qtcreator qtbase5-examples qtdeclarative5-examples
And I got Qt Creator where all Qt classes are highlighted as errors with message "Use of undeclared identifier". But projects are compiled correctly. АUtocompletion of Qt Classes is also not working.
I don't want to install version from Qt site, because repo versions run faster.
Screenshot:
I've got it fixed by going to Help > About Plugins > C++ > uncheck ClangCodeModel. Restart QtCreator.

Build QtWebEngine 5.9.1 with proprietary codecs

We need to support to mp4 file in QtwebengineView. So we are trying to build qtwebengine of Qt 5.9.1 on msvc2015 x64, with proprietary codecs, by using following command at cmd with working directory is qtwebengine in source.
"D:\qt-everywhere-opensource-src-5.9.1\qtbase\bin\qmake.exe WEBENGINE_CONFIG+=use_proprietary_codecs"
we are facing below error.
WinRT is not supported.
QtWebEngine will not be built
We tried to follow following link:
How to compile Qt webengine (5.11) on Windows with proprietary codecs
But that didn't work either.
How can we build qtwebengine of qt 5.9.1 with proprietary codecs?
I just successfully build QtWebEngine 5.9.6
My build environment:
Windows7 x64
Visual Studio 2015 x64
jom 1.1.2
You can refer to my build process.
Before we start building, let's install the tools:
Python 2.7.13 from https://www.python.org/downloads/windows/
Perl (Strawberry vesion) from http://strawberryperl.com/
Bison and flex from https://sourceforge.net/projects/winflexbison/ (Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe)
Gperf from http://gnuwin32.sourceforge.net/packages/gperf.htm
Download the source code for qt
git clone https://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.9.6
perl init-repository --module-subset=qtwebengine,qtwebview
Let's start the formal build
cd qtwebengine
qmake.exe WEBENGINE_CONFIG+=use_proprietary_codecs
jom.exe
Then there's the long build process...
The final file will be generated in the qt5/qtwebengine/bin directory after the build is completed

I need a minimal QT 5.0 Compiler install for Ubuntu 14.04 64bit

I need a minimal QT 5.0 Compiler install for Ubuntu 14.04 64bit
I just need to run qmake and have the QT includes, macros and libraries work under g++. I do not need The QT GUI development environment.
I tried the following...
wget http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x64-5.5.0.run
... Follow instructions... At the end I get "Warning: QSqlDatabase: QMYSQL driver not loaded" which I need.
So I had to build from source, which takes overnight! (but does work)...
git clone git://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.5
... Follow instructions... It does work.
I only want the compiler, not everything! How do I get that?
Alan.
Just install a package called build-essential + the Qt5 development packages you need (or qt5-default package). Ubuntu 14.04 has Qt 5.2.1 in the package repositories.
build-essential installs g++ tool chain and qt5-default installs the Qt5 development libraries.
Qt is not a compiler. It is a toolkit framework library coded for C++.
You need at least a C++11 compiler, like GCC (g++, at least 4.9) or Clang/LLVM (clang++)
You probably want to say that you don't need the QtCreator editor and IDE.

Build Project with QtSerialPort

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

Configure error with Qt, MinGW, CMake: Qt version not found

I have a problem building an application from Qt Creator; from the configure step, I get this error:
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindQt4.cmake:1382 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:13 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
If I configure it from the command line, everything is file:
cmake -G "MinGW Makefiles" ..\ProjectDir
In the paths environment variable Qt is present (src, bin and lib paths).
Platform:
Windows 7
MinGW/GCC 4.4
CMake 2.8.11
Qt 4.8.5
Qt Creator 2.8.1
When you want to develop a CMake based project with Qt Creator, you should not execute CMake manually before. Qt Creator generates a Code::Blocks project from your source to work with CMake, so if you generate with -G "MinGW Makefiles" it will not work.
Instead, you could try the following steps:
In Qt Creator, Open Project > Select the top level CMakeLists.txt
Set a build directory somewhere close to the CMakeLists.txt or in its parent folder, then click on Next
Select your generator (Combination of a Qt version and a compiler)
[optional] set some CMake arguments
Click on Execute CMake, then Finish
Your project should now be opened in Qt Creator and ready for development

Resources