Solved Can't compile QT 5.5 source to static
From many days i've problem to compile qt 5.5 src static. I've got:
Python 2.7 also trying Python 3.3
Mingw from http://www.mingw.org
I'm added path to CMD including all:
Trying to configure with recommended parameters success (-platform win32-g++)
But if i mingw32-make - i've getting lots of errors (one of them)
makefile:80: recipe for target 'module-qtbase-install_subtargets' failed
I've trying also installing using powershell script - same results.
One of error in screenshot: http://pl.tinypic.com/r/245ezpk/9
Errors are not always the same.
Please help. Fresh install of windows 7 32 bit with SP1
Windows SDK installed
Looks like QT don't want me...
I wrote app for my self that using mysql database, but i can't run it on my second computer - i always have mysql error connection (but i've install all required dll and mysql database on it).
I've try every tutorial in the net that i found to compile without results.
I'm guessing that my mingw is incompatible with QT. But i can't find other that contains mingw32-make file.
Hi and welcome to devnet,
If it's only a MySQL error on your other machine then it might simply be a deployment issue that doesn't require a full re-build of Qt.
Did you check that you are providing the MySQL client DLL with your application ?
Yes, and after hours of work, i try to use odbc and its work ok on developer machine, but problem repeats when i copy this to second machine. I've got error: Failed to load platform plugin windows....
I'm checked forum, found this: https://forum.qt.io/topic/20759/solved-failed-to-load-platform-plugin-windows/9
but... in my case i've got all the files and program didn't run. Every one says that platform may be, but In my case - it is not qwindow.dll problem i think.
My pro file:
QT += core gui sql
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = sprzedaz
TEMPLATE = app
QTPLUGIN += QSQLMYSQL
SOURCES += main.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
INCLUDEPATH += "./"
Build to release, files include:
platforms (with qwindows.dll)
plugins/platforms/qwindows.dll (trying in many ways)
IEShims.dll (Dependency walker say that this file is not found)
I've got installed MSVC++ Redistributable 2013 (2015 doesn't want to be installed - error)
Installed mysql driver for odbc
Included headers (may help):
It's easy app - view, add to db (my first one working in QT :-P)
I've also try to compile QT 5.2.1 - same errors like in 5.5.1 - same environment.
Ps. If QT will automatically tells what dll is needed .... I like coding QT but i loose many time on simple application to run on second machine. For now when i learning QT. I'm already PHP programmer, but always want to make WINDOW APP's ;-)
Use the windeployqt helper program to do the deployment, it should get all the plugins you need.
Thank You for quick reply. I've used this tool now, and... Many files appears :-)
New error (trying to translate from my language)
Can't find point of procedure entry
_cxa_throw_bad_array_new_length in library libstdc++-6.dll
This is on my developer machine
Edit: Looks like this tool gets files from mingw installation, after i copy libstdc++-6.dll from QT MinGW - same error like before. "..QT platform windows plugin" (before on developer machine this work)
I'll try to uninstall all additional software like cygwin and mingw, and give You information after this.
Edit after uninstall:
NOTHING CHANGED :-((((((((
I've try to compile simple empty project and after insert all files its work, so i think problem is in one of modules that is include (or not include). I can prepare whole project in zip so someone maybe can look at headers and maybe i need to add something to .pro file or header.
If someone ready to help, please assist e-mail. I will send full project code.
To debut that:
- Nuke the build folder
- Start a new build
- Call windeployqt
- Start the application from explorer
- If it fails, use Dependency Walker to find what it missing
Don't copy anything from the Qt Creator folder, only from the Qt and MinGW folder
I found solution. I should add QT_QPA_PLATFORM_PLUGIN_PATH to environment.
SET QT_QPA_PLATFORM_PLUGIN_PATH= path to directory contains platform directory.
If you need that for your application to run then it seems that it's not properly deployed especially on Window.
Other way was to create plugin directory, and insert platform directory inside plugin folder.
This makes my app works well on any windows system :-)