I have a simple app that I can compile on the desktop for Ubuntu 12.04, but not for Windows. I installed the MinGW toolchain, both from synaptic, and the QT 64-bit package from here.
I went to Tools-->Options-->Build, and manually added both the /usr/bin/i686-w64-mingw32-g++, as well as the g++.exe from the link above (in the bin folder) as MANUAL_1 and MANUAL_2.
When I go to create a custom target however I am unable to select either Manual toolchain and it reverts back the standard GCC x86_64 linux.
What am I doing wrong?
I doubted the g++.exe file would work since that is a windows binary, but why does it not select the system mingw binaries?
Few things you should check
Your gcc version number
Is your gcc path added to environmental variable?
I too found it very difficult to compile my MINGW Qt application in Windows, and after lot of research on net I found that qt4 works with gcc 4.4.0 MINGW. I downloaded qtcreator 2.1 from qt website and copy MINGW folder from qtcreator directory, copy that folder into my windows root directory then installed latest qt creator and qt4 sdk,
Add path of gcc
and finally qt creator compiles my code.
Related
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.
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 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 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.
I installed Qt Creator. I would like to use Qwt. I downloaded and unzipped to "C:\qwt-6.1.0" folder. I performed the following instructions:
qmake qwt.pro
mingw32-make
mingw32-make install
There is no error. Everything is fine. But I don't know how I can integrate with Qt creator. I would like to use Qt via form editor. How can I install plugin?
Thanks
Platform
Windows 7
Versions
Qt Creator 2.7.2
Qt 5.1.0(32 bit)
Qwt 6.1.0
http://www.qtcentre.org/threads/53787-HowTo-Installation-of-Qt-5-0-1-and-Qwt-6-1-0-rc3-(Win7-64bit)
check this.Its works also on win8 64 bit.