How to install Qt5 with Visual Studio compiler at CircleCI? - qt

I need to install Qt5 with MSVC compiler (for Windows) using CircleCI.
choco installs only MinGW compiler which is not acceptable for my case. Also there are some options (e.g. choco install qt-sdk-windows-x64-msvc2012) but they look to be outdated. The file choco tries to download does not exist any more.
When I try to download the Qt offline installer and to run it from cmd using --script option it nevertheless requires the UI environment to display the window.
Could you please advise whether there is any option to install the Visual Studio compiler for Qt on Windows?

Related

qmake not properly recognized in QT Creator under Debian 11 "bullseye"

I have installed QT Creator under Debian 11 "bullseye" (sudo apt-get -y install qtcreator), resulting in QT creator version 4.14.1.
Then I installed qmake (sudo apt install qt5-qmake), resulting in qmake version 5.15.2.
Now I want to add qmake in QT Creator options under Kits->QT versions, but it says
QT version is not properly installed, please run make install
and it refuses to work:
I have also another machine with Debian 12 bookworm, where I have been using this setup without any problem for several months (the yellow triangle in the screenshot below is only warning). On Debian 12 bookworm, the QT Creator is now version 8.0.1 (recently it was 6. something) and qmake version is 5.15.4:
Any idea how to make it work under Debian 11? I need to use the older environment, because I need specific older libraries to be build in the application.
I have tried almost everything that I found over the internet, but nothing helped. Usually the sources say to install qt5-default package, but this is not available in Debian 11.

Qt Kit Selection

I recently installed Qt Creator on my Ubuntu machine using the command:
$ sudo apt install qtcreator
$ sudo apt install qt5-default
I also know that it is correctly installed through this
$ qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"
However, the Qt Creator app still does not let me select a Kit because my Qt Versions is
still empty:
It seems there are others with the same issue but I cannot find a solution.
Ultimately, this all began because I was trying to make a project after installing Qt but I could not get passed this Kit Selection:
menu. I learned that the kit selection problem stems from not having the "Qt version" installed. However, I still cannot find a solution to how I can correctly install this Qt version.
you should install gcc and g++ compiler, look at Qt documentation
you should write this command
sudo apt-get install build-essential
Launch Qt Creator. Go to Tools > Options. Click Build & Run and select
tab Kit. Configure a compiler if it is not automatically detected.
this problem happens because of qt creator didn't understand and find the compiler, you should install it, after that it is usually automatically detected. if you have this issue again you should add it manually in the compiler section and in the kit section set compiler for your Desktop kit.
For adding manually compiler look at this QT Documentation
For adding manually kit look at this QT Documentation
For Adding Qt Versions manually
look at this QT Documentation
To add a Qt version:
Select Tools > Options > Kits > Qt Versions > Add.
Select the qmake executable for the Qt version that you want to add.
Select the Qt version to view and edit it.
In the Version name field, edit the name that Qt Creator suggests
for the Qt version.
In the qmake location field, you can change the qmake location.
If the Qt version is for QNX, enter the path to your installed QNX
SDK in the QNX SDK field.

How to update Qt version that qmake uses?

I am trying to use qmake with QT 5.7.0 or later. I have installed QT 5.7.0. I have never installed another version of QT before or after this. When I run
qmake --version
it tells me it is using Qt 5.5.1. I don't know how it gets to this version, this version was never installed by me. I would like to update the version that qmake uses. How can I do that?

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.

R package with Rcpp and CMake (Windows)

I'm using CMake as a build tool to create C++ shared library with Rcpp. To trigger CMake while invoking R CMD INSTALL command the top configure script need to look something like this:
rm -rf _builds
cmake -H. -B_builds
cmake --build _builds
...
Such approach works nicely on Linux and Mac OS, but not on Windows machine.
What version of CMake expected in configure:
windows native cmake
cygwin cmake
What generator do I need to use:
Unix Makefiles (cygwin)
MSYS Makefiles (native)
MinGW Makefiles (native)
SSCCE
https://github.com/forexample/rcpp-test
Leave all Makefile files (Makefile.win for windows) empty:
all:
Put CMake build instructions into configure (configure.win for windows):
cmake -H. -B_builds
cmake --build _builds
Such approach works nice for me on Linux, Mac and Windows (native cmake with Visual Studio generator). Note that it's probably not compatible with cran and windows build need to be tuned to compile different architectures (see R_ARCH) but it works locally and fit my needs.
Example

Resources