Qt5 deploy application on Windows from QtCreator
-
Hi all,
I was working for 2 months with Qt and I start to feel comfortable with it. However, since 2 days I am trying to deploy a small application in order to run it in other windows PC, and I do not get any result.
I was following a lot of guides like:
http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html
or
http://qt-project.org/wiki/How_to_build_a_static_Qt_version_for_Windows_with_gcc
The first one is quite incomplete and the second one I think it is pointed on Qt4. I get to know, that I needed to have a tool such "configure.exe" in order to build Qt statically. Once I reinstall Qt5.0.1, I found configure.exe in the next path: C:\Qt\Qt5.0.1\5.0.1\Src\qtbase.Then I execute: configure -static -platform win32-g++
And in this point, my command prompt hangs out, and I dont get any feedback.
Moreover I have questions about the next step: mingw32-make sub-src
First of all, I found mingw32-make.exe in a complete different path, under C:\Qt\Qt5.0.1\Tools\MinGW\bin. And sub-src is not an option for this command o_O.I am really lost. Does anyboy know any documentation about this topic?
-
Please mind licensing issues when compiling Qt statically (it's not very compatible with LGPL).
Better to link dynamically if possible in your situation - that way you don't really need to compile Qt itself, just deploy libs you already have. The doc you have linked explains it well - you need to copy the platform plugin and all library dependencies (those vary on depending on your setup).
If you really want static Qt, go for Qt 5.1, it fixes some bugs in static compilation.
-
Thank you very much slerdzlo. I am trying dynamically, and hopefully I can go through the proccess easilier.
-
[quote author="sierdzio" date="1371131314"]Please mind licensing issues when compiling Qt statically (it's not very compatible with LGPL).
Better to link dynamically if possible in your situation - that way you don't really need to compile Qt itself, just deploy libs you already have. The doc you have linked explains it well - you need to copy the platform plugin and all library dependencies (those vary on depending on your setup).
If you really want static Qt, go for Qt 5.1, it fixes some bugs in static compilation.[/quote]
I have a question: in the link about dynamically linking http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html, it seems you have to use VS, but I am using MinGW as compiler. Does it mean any change apart from no necessary the compiler libraries (msvcpXX.dll)???
Thank you in advance. -
Yeah, I think you are right.
-
[quote author="sierdzio" date="1371136037"]Yeah, I think you are right.[/quote]
Hi, I have a new question about the dynamic linking. Now, I got an error message ("Runtime error") when I run my Qt application in other PC, but I am confused because the error message comes from Visual C++. This compiler is not installed in the PC, but it was installed in the PC where I develop the Qt application. After uninstalling VisualC++, I tried again the application in other PC, but the same error message appears.
From where comes this Microsoft Visual C++ error. I am using MinGW as compiler for Qt. Moreover I am using Qt5.0.1 with MinGW 4.7, is there any kind of incompatibility, as somebody say in this post http://qt-project.org/forums/viewthread/21079/#100664 ? -
I do remember people talking about it but I don't remember the conclusion. Possibly your ICU is built with MSVC instead of MinGW?
-
Sorry for my ignorance, but what does ICU mean?
-
libICU is one of Qt dependencies. You must have either downloaded a ready-made package or compiled it yourself before using Qt5 (well, it's not a hard-dependency, but in most cases you need to have it somewhere around).
-
I have already found the answer http://site.icu-project.org/ , so I am trying to compile it on my own using MinGW.
Thanks.