Minimal sample won't run under Windows10

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
David Boudville
In need of some credit
In need of some credit
Posts: 3
Joined: Fri May 18, 2018 7:29 am

Minimal sample won't run under Windows10

Post by David Boudville »

Hi,

I have recently compiled wxWidgets-3.1.1 using MinGW32 without any problems. I also complied the samples/minimal as a test but it won't run. Attached is the dialog box that I get.
Screenshot 2018-05-18 15.34.47.png
Screenshot 2018-05-18 15.34.47.png (21.68 KiB) Viewed 1436 times
gcc version used to compile

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)

I am running Windows10 Hoime 64-bit on an i7-4790 with 12 GB RAM. Never had this problem before. Any ideas? Thanks.

David
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: Minimal sample won't run under Windows10

Post by PB »

Cursory Google search indicates that the issue may be the DLL mismatch problem, i.e., there is a GCC library in the path but it is different than the one the application was built with. Try what is described in the linked solution: Copying the DLL (libstdc++-<version>.dll) from your MinGW bin directory to the directory where the minimal executable is.
David Boudville
In need of some credit
In need of some credit
Posts: 3
Joined: Fri May 18, 2018 7:29 am

Re: Minimal sample won't run under Windows10

Post by David Boudville »

Thanks for that. It now works correctly. Now to find that gcc library that is causing all this.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: Minimal sample won't run under Windows10

Post by PB »

David Boudville wrote:Now to find that gcc library that is causing all this.
You could use the "where" command. I.e., launch the command prompt and type something like (you may use the version number your GCC uses instead of the asterisk)

Code: Select all

where libstdc++-*.dll
You should see all the files matching the pattern found in any folder in the %PATH%.

However, generally speaking, you should install all necessary DLLs into the folder with the executable to prevent this unfortunate issue (a DLL has same name but is binary incompatible) from happening.
David Boudville
In need of some credit
In need of some credit
Posts: 3
Joined: Fri May 18, 2018 7:29 am

Re: Minimal sample won't run under Windows10

Post by David Boudville »

Cool. Thanks for that. I'll also start looking at Dependency Walker when I start coding. 8)
Post Reply