Problems wth wxWidgets Linux using mingw32-w64 target for Windows

13 views
Skip to first unread message

Oliver Bailey

unread,
Aug 24, 2021, 4:45:16 PMAug 24
to wx-users
I've been using wxWidgets for many years doing cross development from Linux to Windows and Mac. I recently updated a Debian 10 system to Debian 11.0.0. I use static linking to avoid DLL issues in the executable programs and have never had problem until today. I received an error on execution there are three missing DLL files:
libgcc_s_seh-1.dll, libstdc++6.dll, and LdrInitializeThunk, which isn't clear if it is a DLL or not.
Since none of the wxWidget libraries are throwing an error, it appears those have been linked statically. My problem is that I can't find any DLL files in the Mingw32-w64 paths at all.

Has anyone ever had this issue and if so, how was it resolved.

Thank you in advance.

Oliver Bailey

Vadim Zeitlin

unread,
Aug 24, 2021, 4:47:45 PMAug 24
to wx-u...@googlegroups.com
On Tue, 24 Aug 2021 13:43:26 -0700 (PDT) Oliver Bailey wrote:

OB> I've been using wxWidgets for many years doing cross development from Linux
OB> to Windows and Mac. I recently updated a Debian 10 system to Debian 11.0.0.
OB> I use static linking to avoid DLL issues in the executable programs and
OB> have never had problem until today. I received an error on execution there
OB> are three missing DLL files:
OB> libgcc_s_seh-1.dll, libstdc++6.dll, and LdrInitializeThunk, which isn't
OB> clear if it is a DLL or not.
OB> Since none of the wxWidget libraries are throwing an error, it appears
OB> those have been linked statically. My problem is that I can't find any DLL
OB> files in the Mingw32-w64 paths at all.

Under Debian you need to install gcc-mingw-w64-$arch-$variant-runtime
package which contains these DLLs and copy them to your application
directory. $arch here is either "i686" or "x86_64" and $variant is either
"win32" or "posix" depending on the compiler variant you use.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

Oliver Bailey

unread,
Aug 24, 2021, 5:04:05 PMAug 24
to wx-users
Thank you Vadim,
I verified after you responded the support packages are installed. It appears all the dll files are missing in the Debian 11 version of the x86_64 and i686 versions of mingw-w64. I cannot find one dll file.
I may go back to a Debian 10 system, because it did work there.

Thank you again.

Oliver Bailey

Oliver Bailey

unread,
Aug 24, 2021, 5:08:28 PMAug 24
to wx-users
I found them....

Thanks Vadim.

Vadim Zeitlin

unread,
Aug 24, 2021, 5:09:37 PMAug 24
to wx-u...@googlegroups.com
On Tue, 24 Aug 2021 14:04:05 -0700 (PDT) Oliver Bailey wrote:

OB> I verified after you responded the support packages are installed. It
OB> appears all the dll files are missing in the Debian 11 version of the
OB> x86_64 and i686 versions of mingw-w64. I cannot find one dll file.
OB> I may go back to a Debian 10 system, because it did work there.

It does work for me in Debian Sid and we even test this in one of our CI
workflows (see https://github.com/wxWidgets/wxWidgets/actions/runs/1163129225
for the last run on master and .github/workflows/ci_msw_cross.yml in the
repository for the corresponding workflow file, notably setting WINEPATH to
the directory containing the DLLs required by the tests), so I find it very
surprising that it doesn't work in Bullseye.

Which DLL file exactly is missing? Have you tried searching for it on
https://www.debian.org/distrib/packages to see if perhaps it's present in
some other package?

Oliver Bailey

unread,
Aug 24, 2021, 6:08:21 PMAug 24
to wx-users
Hi Vadim,
They were two DLL's. libgcc_s_seh-1.dll and stdc++-6. I fond them in /usr/lib/gcc/x86_64-mingw-w64. I have now added the path to Wine and everything works great. 

Once again, thank you very much. I'm doing an update to a book I wrote in 2004 on cross platform development that will be out in a few months. 

Take Care,
Oliver Bailey
Reply all
Reply to author
Forward
0 new messages