PDA

View Full Version : some errors when i run my app .exe



davinciomar
23rd August 2016, 17:40
Hi i compiled succesfully my application but anyways when i run; it show me some errors like missings dlls; So if you know about this pls help.
I Share pictures:
https://i.imgsafe.org/c799296767.png
https://i.imgsafe.org/c79a14e371.png
https://i.imgsafe.org/c79ba4e19e.png
https://i.imgsafe.org/c79ccbd0e2.png

When i run since qtcreator the .exe run very well. The Strange thing is that i get these errors when i run the exe file compiled? Why?

Lesiok
23rd August 2016, 18:45
Nothing strange. Read somewhere what dll is (every DLL not only Qt) and how they should be installed in the system.

anda_skoa
23rd August 2016, 18:47
Maybe you forgot to copy the Qt DLLs to the location of the exe?

Cheers,
_

davinciomar
23rd August 2016, 19:06
one question about this i can compile libraries of static mode? Which versio nyou recommend me to do this? Some people say me that i need to use qt 5.5 to configure static libraries i can use 5.7, sorry for all regards,

Radek
23rd August 2016, 19:49
I guess you have compiled your app using Visual C++. Visual C++ can compile a Qt app but it does not contain the Qt. You have only import libraries but you have not the DLLs. Therefore:

(1) Check which import libraries for Qt you have. They will be named the same way as the missing DLLs but with the extent .lib instead of .dll .
(2) Check the version (and the subversion) of Qt your Visual C++ uses. You need DLLs of the same version (and subversion).
(3) Check the version of GCC your Visual C++ uses (the last failure among the pictures).
(4) Get the Qt DLLs and libgcc DLL of the version you have found.
(5) Put all this to same directory and place the directory on your PATH.

Try running again. Notes:

(1) There is more DLLs than the three from the pictures (the pictures report that core, gui, and widgets is missing). Download all DLLs you can (and which you have import libraries for).
(2) The DLLs you find can be named slightly differently (the names can contain versions and so on). Rename them so that they have names like the import libraries (and ectent .dll instead of .lib).
(3) If you cannot get the right version DLLs, you will need to compile. Good luck ... :p

davinciomar
23rd August 2016, 19:56
yes but i think i can import all these libraries with command configure like this: configure -release -qt-libjpeg -qt-zlib -qt-libpng (the libraries that i need) -static or not??? i am refering to this post http://dimitris.apeiro.gr/2015/06/24/build-a-static-qt5-for-windows-by-compiling/
thxx a lot for your help thxx;)

d_stranz
24th August 2016, 04:33
The configure command is used when building Qt itself, not when linking Qt into your own app. It has nothing to do with "importing" libraries when linking your application. Your problem is with deployment.

If you are building a commercial app, then you must have a Qt commercial license if you want to link to static Qt libraries. If you do not want to buy a Qt commercial license, then you must link so your app uses dynamic (DLL) Qt libraries. You will be in violation of the Qt license otherwise.

If you have downloaded and installed Qt properly, your distribution will contain all of the Qt .lib files you need at link time, and all of the .dll files you need at run time. Read the article on Qt for Windows - Deployment (http://doc.qt.io/qt-5/windows-deployment.html).