QtCore.dll missing error after build static app
IMAN4K last edited by IMAN4K
configure -release -opensource -static -platform win32-msvc2013 -qt-sql-odbc -confirm-license -nomake examples -nomake tests -qt-zlib nmake nmake install
Now i have a 5GB Qt directory called
D:\Qt5.7and also have qt in my environment.
After trying to build my project using this command :
qmake -config release App.pro nmake
I get log :
link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /debug /opt:ref
/INCREMENTAL:NO /Debug /SUBSYSTEM:WINDOWS
processorArchitecture=''" /MANIFEST:embed /OUT:release\App.exe
Now i have a 15MB executable
App.exewitch throw error after running :
I'm using Visual Studio 2013(
nmake) + windows10 + Qt5.7 and
.prois this :
TARGET = App TEMPLATE = app QT += core gui widgets sql network printsupport CONFIG += static LIBS += -L$$PWD/quazip/lib -lquazip INCLUDEPATH += . RESOURCES += app.qrc include($$PWD/breakpad/crash_handler.pri) QMAKE_CFLAGS_RELEASE +=/Zi QMAKE_LFLAGS_RELEASE +=/debug /opt:ref QMAKE_LFLAGS_RELEASE +=/INCREMENTAL:NO /Debug SOURCES += main.cpp\ . . . HEADERS += \ . . .
Dependency walker result :
What is the wrong ?
koahnig last edited by
The docs for CONFIG say:
static The target is a static library (lib only). The proper compiler flags will automatically be added to the project.
Therefore, I guess you are still linking with the lib stubs for dlls. Make sure that you are using the qmake generated with the static lib compilation.
Make sure that you are using the qmake generated with the static lib compilation
Yes i'm sure because while i have another qt installation (in another path) but just static bin path is in environment variable so i'm using qmake from
Could anyone help me please :(
You can try to use it as a kit
"Using the Qt static environment with Qt Creator"
Also I had to edit
To make it use static.
I build static 5.7 following this guide
Thanks @mrjj .
The Problem was the
Quazipthat was linking to dynamic Qt libs witch Dependency walker won't show up at run time.
First i should build it as static like so :
TEMPLATE = lib CONFIG += qt warn_on QT -= gui DEFINES += QUAZIP_BUILD CONFIG += staticlib CONFIG(staticlib): DEFINES += QUAZIP_STATIC include(quazip.pri)
Then i should link that in my .pro :
. . . LIBS += -L$$PWD/quazip/ -lquazip INCLUDEPATH += $$PWD/quazip PRE_TARGETDEPS += $$PWD/quazip/quazip.lib DEFINES += QUAZIP_STATIC . . .