1

I've build qt for static linking to make just one exe without any dll's, configured creator. On my computer everything works. But when i run a program on other computers nothing happens. Process starts, but nothing is shown. And it's only with qml, it works with c++ projects. I tried to make a simple exe and add all needed libraries by windeployqt, but it doesn't change anything.

Maybe someone can tell me, what am i doing wrong?

6
  • It sounds as the application is not completly static. Try checking with Depency Walker (or equivalent tool) if you really do not require libraries. If you build your app using msvc you probably are missing the msvc redistributable. Commented Nov 14, 2014 at 7:36
  • I'm using mingw. Ok. I'll try to check depency walker. Commented Nov 14, 2014 at 12:27
  • Not found GPSVC.dll and IESHIMS.dll. Commented Nov 14, 2014 at 12:48
  • Both shouldn't be a problem. Try supplying platform/qwindows.dll in the directory of your executable. Commented Nov 14, 2014 at 13:04
  • 1
    Try adding the following files one after another and check if app runs: libstdc++-6.dll, platforms/qwindows.dll, libgcc_s_dw2-1.dll I think stdc++ and gcc_s_dw2 cannot be omitted if i remember correctly Commented Nov 14, 2014 at 13:07

4 Answers 4

3

I have found that with QML applications you might need directories from the following directory: ..\Qt5.3.2\5.3\msvc2013_opengl\qml\

The directories needed depends on what you have included.

For my application I had the following structure:

my.exe
QtGraphicalEffects
QtQuick
QtQuick.2
Sign up to request clarification or add additional context in comments.

1 Comment

Ok, that's help a little. Now i have a blank window.
1
  • First run the mingw on cmd terminal of windows (on my case it is on C:\Qt\6.1.1\mingw81_64\bin).

  • After this go to your project output (where is your .exe file that you want to run on another windows machine).

  • Run the windeployqt command:

windeployqt.exe --qmldir C:\Qt\6.1.1\mingw81_64\qml .

I run the example project "Qt Quick Application - Scroll". The blank screen only happens on PCs that do not have a video card with OpenGL 2.0 support.

1 Comment

cool! is the trailing . nessecary? would you mind editing the post so the command is clearly in code format (backticks)?
0

Try this:
1. Used dependency walker(http://www.dependencywalker.com/) to see the exact path of the dlls needed. Try it because both QtCreator and QT framework both have the same dlls and you must pinpoint the exact ones used. I copied all dlls needed in the same folder as the app.

2.I have copied the folder platforms from QT framework /plugins and copied it in the same folder as the app. Now the app comtained also plugin/platform/ folder with all its dlls

3.And the most important step in my case is to create a file named qt.conf in the same folder as the app . This file should contain the path to the plugins. My qt.conf file contains:

[Paths]
Libraries=../lib/qtcreator
Plugins=plugins
Imports=imports
Qml2Imports=qml

1 Comment

He is building static
0

Try copying every DLLs in below folder to the folder where your exe is.

C:\Qt\x.x.x\msvc20xx_xx\bin\

If the exe runs normally, try deleting the DLLs some by some to find out what dll is needed and what is not needed.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.