Problem with MDI on windows 10

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
jppillou
In need of some credit
In need of some credit
Posts: 5
Joined: Sat Jan 12, 2019 5:49 pm

Problem with MDI on windows 10

Post by jppillou »

Hello,

I have developped an application using MDI, under CodeBlocks + wxWidgets 3.1.1.7, on Windows 7. This appli runs fine on Windows 7.

I switched to a new PC running windows 10, rebuilt the whole above environment, and rebuilt the same project.
The exe is generated, but does not show anything on screen, and then aborts after 10 seconds.

- the exe generated on windows 7 does not execute OK on windows 10 (whichever execution mode I select).
- the exe generated on windows 10 works OK on windows 7.


Other applications which do not use MDI don't have this problem.


Any hint on what's going wrong? What am I missing?
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problem with MDI on windows 10

Post by doublemax »

the exe generated on windows 7 does not execute OK on windows 10 (whichever execution mode I select).
What do you mean with "execution mode"?
the exe generated on windows 10 works OK on windows 7.
Does it also work on Windows 10?

Do you use the exact same compiler version on both systems?
Use the source, Luke!
jppillou
In need of some credit
In need of some credit
Posts: 5
Joined: Sat Jan 12, 2019 5:49 pm

Re: Problem with MDI on windows 10

Post by jppillou »

doublemax wrote:
the exe generated on windows 7 does not execute OK on windows 10 (whichever execution mode I select).
What do you mean with "execution mode"?
In the property Windows, thumb "compatibility", it is possible to select Windows 7, Windows 8, Windows XP, run as administrator ….
doublemax wrote:
the exe generated on windows 10 works OK on windows 7.
Does it also work on Windows 10?
No, it doesn't.
doublemax wrote: Do you use the exact same compiler version on both systems?
Yes, exactly the same. As a matter of fact, I reused the same installation package which I had kept from my initial install on Windows 7.
And this package is common to 7 and 10.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problem with MDI on windows 10

Post by doublemax »

So basically you're saying: It doesn't matter where you build it, the exe only runs on Windows 7, but not on Windows 10?

Does it also happen with the MDI sample that comes with wxWidgets?
Use the source, Luke!
jppillou
In need of some credit
In need of some credit
Posts: 5
Joined: Sat Jan 12, 2019 5:49 pm

Re: Problem with MDI on windows 10

Post by jppillou »

Right: it works on Windows 7 and not on Windows 10, even for the exe built on Windows 10.

Yes (I forgot to mention): exactly the same occurs with the MDI example provided in "samples", whereas other examples run OK.
This is why I guess this a MDI related issue.

I plan to retry with the latest stable release, which is 3.0.4.

By the way, thank you for your help.

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

Re: Problem with MDI on windows 10

Post by PB »

The usual procedure would be to debug it to see where (and why?) it gets wrong.

My guess is when even the MDI sample, does not work, the issue is with your wxWidgets build/setup. How did you exactly built it and your app?

BTW, there are no wxWidgets 3.1.1.7: I would try the last release in the 3.1 branch, i.e., 3.1.2.
jppillou
In need of some credit
In need of some credit
Posts: 5
Joined: Sat Jan 12, 2019 5:49 pm

Re: Problem with MDI on windows 10

Post by jppillou »

You're probably right.

Sorry: I got mixed up with the extension 7z.
The release is actually 3.1.1

- I think I downloaded from this url
https://www.wxwidgets.org/downloads
Is it correct or not?
If it is, 3.1.2 is the release you suggest?

I am going to try anyway, with 3.1.2, and see what happens.

The procedure I apply is:
- unzip wxWidgets-3.1.2.7z to C:\wxWidgets-3.1.2

Following in DOS command window:
---------------------------------------------

- add mingw32 bin path to PATH
PATH=%PATH%C:\Program Files (x86)\CodeBlocks\MinGW\bin;

- go to directory C:\wxWidgets-3.1.2\build\msw

- enter command:
mingw32-make -f makefile.gcc BUILD=release clean

- enter command:
mingw32-make -f makefile.gcc BUILD=release

And finally add the proper search paths in CodeBlocks, for compiler, linker, and resources.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Problem with MDI on windows 10

Post by PB »

Your build line seems OK, except it is recommended to prepend the build directory, i.e.

Code: Select all

PATH=C:\Program Files (x86)\CodeBlocks\MinGW\bin;%PATH%
I would certainly always make a debug build as well, not to mention when running into an issue. Code::Blocks support multiple build configurations just fine. I assume there is no mixup with wxWidgets libraries which may be provided by C::B and the ones you built yourself.

What MinGW/GCC version do you have?

I built wxWidgets 3.1.2 library and MDI sample in a 32-bit debug DLL configuration with mingw-w64 (i686-8.1.0-posix-dwarf-rt_v6-rev0) using a provided CMakeFile. The MDI sample seems to run just fine on 64-bit Windows 10 Pro v1809.

EDIT
MDI sample worked for me also when the sample and the library were built with provided mingw makefiles (mingw32-make -f makefile.gcc).
jppillou
In need of some credit
In need of some credit
Posts: 5
Joined: Sat Jan 12, 2019 5:49 pm

Re: Problem with MDI on windows 10

Post by jppillou »

Since I had no better result with 3.1.2, I compared MY mdi sample with the original mdi in the sample directory.
And it turns out that I did some modifications … which I had completely forgotten :oops: .

So I ran the proper mdi code, and it runs fine.

… which means that the problem is in whatever adaptation I did from this code.

The stange thing is why this ran OK on Windows 7... but anyway I review my copy and restart from that clean base.

Sorry for wasting your time, and thanks again for your help.

JPP
Post Reply