Discussion:
[Mingw-cross-env-list] Generated .exe does not work
Thomas Spitzer
2018-01-08 15:54:42 UTC
Permalink
Finally I am able to buld my hello world application with MXE.
I can successfully build for 4 tagets:

- x86_64-w64-mingw32.static
- i686-w64-mingw32.static
- x86_64-w64-mingw32.shared
- i686-w64-mingw32.share

Unfortunately all 4 do not work on my 64 Bit Windows 7

i686-w64-mingw32.shared (see shot1.png)
after running windeployqt.exe: (see shot2.png)

i686-w64-mingw32.static (see shot3.png)
windeployqt.exe: generates error:

C:\Qt\Qt5.10.0\5.10.0\mingw53_32\bin>windeployqt.exe
C:\Users\thomas\Downloads\archive\archive\gui\src\qt_hallobuild\i686-w64-mingw32.static
C:\Users\thomas\Downloads\archive\archive\gui\src\qt_hallo\build\i686-w64-mingw32.static\qt_hallo.exe 32 bit, debug
executable
C:\Users\thomas\Downloads\archive\archive\gui\src\qt_hallo\build\i686-w64-mingw32.static\qt_hallo.exe does not seem to be a Qt
executable.

For the 64 Bit variant it's simmular.

There must be something essentional I've missed. Do you see it?
Manner Róbert
2018-01-09 08:46:26 UTC
Permalink
Hi,

seems you have a release build, so you need the Qt libraries without the
'd' suffix (Qt5Core.dll instead of Qt5Cored.dll). Might be windeployqt is
not able to handle that.
I prefer to use tools/copydlldeps.sh/py from mxe, it crawls through the
libraries and copies the necessary dll-s they link with.
Note that it does not copy the plugins you use, so you should copy those
manually, you will at least need the platform plugin for windows
(platforms/qwindows.dll).
You might also need to specify a qt.conf so that Qt knows where to find them

$ cat qt.conf
Prefix=.

Br,

Robert

On Mon, Jan 8, 2018 at 4:54 PM, Thomas Spitzer <
Post by Thomas Spitzer
Finally I am able to buld my hello world application with MXE.
- x86_64-w64-mingw32.static
- i686-w64-mingw32.static
- x86_64-w64-mingw32.shared
- i686-w64-mingw32.share
Unfortunately all 4 do not work on my 64 Bit Windows 7
i686-w64-mingw32.shared (see shot1.png)
after running windeployqt.exe: (see shot2.png)
i686-w64-mingw32.static (see shot3.png)
C:\Qt\Qt5.10.0\5.10.0\mingw53_32\bin>windeployqt.exe
C:\Users\thomas\Downloads\archive\archive\gui\src\qt_hallobu
ild\i686-w64-mingw32.static
C:\Users\thomas\Downloads\archive\archive\gui\src\qt_hallo\
build\i686-w64-mingw32.static\qt_hallo.exe 32 bit, debug executable
C:\Users\thomas\Downloads\archive\archive\gui\src\qt_hallo\
build\i686-w64-mingw32.static\qt_hallo.exe does not seem to be a Qt
executable.
For the 64 Bit variant it's simmular.
There must be something essentional I've missed. Do you see it?
Thomas Spitzer
2018-01-09 13:32:18 UTC
Permalink
Thanks, it works now!
Robert Buchinger
2018-01-09 09:40:04 UTC
Permalink
As Robert said, use the correct dll files. The screenshot tells you
which is missing.

The static build contains everything so you do not need any external dll
files.
Post by Manner Róbert
Hi,
seems you have a release build, so you need the Qt libraries without
the 'd' suffix (Qt5Core.dll instead of Qt5Cored.dll). Might be
windeployqt is not able to handle that.
I prefer to use tools/copydlldeps.sh/py <http://copydlldeps.sh/py>
from mxe, it crawls through the libraries and copies the necessary
dll-s they link with.
Note that it does not copy the plugins you use, so you should copy
those manually, you will at least need the platform plugin for windows
(platforms/qwindows.dll).
You might also need to specify a qt.conf so that Qt knows where to find them
$ cat qt.conf
Prefix=.
Br,
Robert
On Mon, Jan 8, 2018 at 4:54 PM, Thomas Spitzer
Finally I am able to buld my hello world application with MXE.
- x86_64-w64-mingw32.static
- i686-w64-mingw32.static
- x86_64-w64-mingw32.shared
- i686-w64-mingw32.share
Unfortunately all 4 do not work on my 64 Bit Windows 7
i686-w64-mingw32.shared (see shot1.png)
after running windeployqt.exe: (see shot2.png)
i686-w64-mingw32.static (see shot3.png)
C:\Qt\Qt5.10.0\5.10.0\mingw53_32\bin>windeployqt.exe
C:\Users\thomas\Downloads\archive\archive\gui\src\qt_hallobuild\i686-w64-mingw32.static
C:\Users\thomas\Downloads\archive\archive\gui\src\qt_hallo\build\i686-w64-mingw32.static\qt_hallo.exe
32 bit, debug executable
C:\Users\thomas\Downloads\archive\archive\gui\src\qt_hallo\build\i686-w64-mingw32.static\qt_hallo.exe
does not seem to be a Qt executable.
For the 64 Bit variant it's simmular.
There must be something essentional I've missed. Do you see it?
--
Robert Buchinger

Hundsheim 31
3512 Mautern
Austria

p: +43 699 10 66 15 15
m: ***@rbuchinger.at
Thomas Spitzer
2018-01-09 14:33:43 UTC
Permalink
Post by Robert Buchinger
As Robert said, use the correct dll files. The screenshot tells you
which is missing.
The program runs now, but the function "app.exec()" crashes with a
null pointer exception :-(

Continue reading on narkive:
Loading...