Answer the question
In order to leave comments, you need to log in
How to build a dll statically using Qt (windows)?
There is a static build of Qt. The executable (*.exe) built with this assembly has a size of approximately ~12MB and runs normally.
But the library fails to build. More precisely, it is going to assemble, it has a size of ~18MB, but when you try to connect it, the application crashes with the error << This application failed to start because it could not find or load the Qt platform plugin "windows" >>.
Everything. The message doesn't even mention what plugins are detected.
QT += widgets qml quick network core gui
TARGET = phpqml
TEMPLATE = lib
CONFIG += static dll qt thread
SOURCES += phpqml.cpp
HEADERS += phpqml.h
#INCLUDEPATH = C:/Qt/Qt5.3.0_Static/include
INCLUDEPATH += C:/src/php-5.3.26\
C:/src/php-5.3.26/main\
C:/src/php-5.3.26/Zend\
C:/src/php-5.3.26/sapi\
C:/src/php-5.3.26/TSRM
LIBS += -L$$PWD/../../../src/php-5.3.26-/dev/ -lphp5ts\
-L$$PWD/../../../Qt/Qt5.3.0_Static/plugins/platforms/ -lqwindows
INCLUDEPATH += $$PWD/../../../src/php-5.3.26
DEPENDPATH += $$PWD/../../../src/php-5.3.26
OTHER_FILES += \
phpqml.qml
#include <QApplication>
#include <QQuickView>
#include <QtPlugin>
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin)
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question