Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

Qt5: Deploying an Application on Windows - Static Linking

$
0
0
Hello, I downloaded qt-everywhere-opensource-src-5.1.0.zip and followed tutorial at http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html [qt-project.org] with these parametres: configure -prefix %CD%\qtbase -static -debug-and-release -opensource -nomake tests -nomake examples -skip declarative -skip quick1 -skip quickcontrols -qt-libpng -qt-libjpeg -no-opengl -platform win32-g++ mingw32-make mingw32-make install I took some time, but it compiled with no error. Then I tried to compile my project with static linking: cd <project_sources> C:\Qt\qt-everywhere-opensource-src-5.1.0\qtbase\bin\qmake.exe <project_sources>\screenshot.pro -r -spec win32-g++ "CONFIG+=declarative_debug" "CONFIG+=qml_debug" "CONFIG+=static" mingw32-make.exe But this failed on qmake: Project MESSAGE: ~~~ static build ~~~ Project ERROR: Unknown module(s) in QT: multimedia My .pro file: QT       += core gui network multimedia widgets   TARGET = screenshot TEMPLATE = app SOURCES += main.cpp\   ... HEADERS  += \   ... FORMS    += \   ...   win32 {   INCLUDEPATH += C:\opencv\build\include   LIBS += -LC:\opencv\build\x86\mingw\lib \       -lopencv_core246 \       -lopencv_highgui246 \       -lopencv_imgproc246 \       -lopencv_features2d246 \       -lopencv_calib3d246 \       -lopencv_video246 \       -lopencv_videostab246     QMAKE_CFLAGS += -static   QMAKE_CXXFLAGS += -static } unix {   CONFIG += link_pkgconfig   PKGCONFIG += x11 opencv }   CONFIG += static static {   CONFIG += static   DEFINES += STATIC   message("~~~ static build ~~~") # this is for information, that the static build is done } What causes the error?

Viewing all articles
Browse latest Browse all 2113

Trending Articles