#15624 closed build error (fixed)

Build issue on branch 3.0 when WXWIN_COMPATIBILITY_2_6=1

Reported by: stahta01 Owned by:
Priority: normal Milestone: 3.0.0
Component: wxMSW Version: 3.0.0-rc2
Keywords: WXWIN_COMPATIBILITY_2_6 wxMSW wxOS_WINDOWS wxMSWDCImpl Cc: stahta01@…
Blocked By: Blocking:
Patch: yes

Description

I found a build issue on wxWidgets branch 3.0 when WXWIN_COMPATIBILITY_2_6=1. Built using TDM MinGW GCC 4.8.1 on Windows 7 32-bit.

The header wx/platinfo.h defines wxMSW to be wxOS_WINDOWS; this results in build error for file src/msw/dc.cpp because it contains namespace wxMSW.

Patch to remove the defines seems best to me.

Tim S.

Index: include/wx/platinfo.h
===================================================================
--- include/wx/platinfo.h (revision 75100)
+++ include/wx/platinfo.h (working copy)
@@ -355,7 +355,6 @@

#define wxWin95 wxOS_WINDOWS_9X
#define wxWIN95 wxOS_WINDOWS_9X
#define wxWINDOWS_NT wxOS_WINDOWS_NT

  • #define wxMSW wxOS_WINDOWS

#define wxWinCE wxOS_WINDOWS_CE
#define wxWIN32S wxOS_WINDOWS_9X


Attachments (1)

wx_3_0_X_MonoLib_SJLJ.patch download (3.9 KB) - added by stahta01 10 months ago.
Patch to change namespace wxMSW to wxMSWImpl

Download all attachments as: .zip

Change History (5)

comment:1 follow-ups: Changed 10 months ago by vadz

Presumably wxMSW here is needed for compatibility with 2.6... Wouldn't renaming wxMSW namespace in src/msw/dc.cpp to wxMSWImpl (which already is used elsewhere) fix this too?

comment:2 in reply to: ↑ 1 Changed 10 months ago by stahta01

Replying to vadz:

Presumably wxMSW here is needed for compatibility with 2.6... Wouldn't renaming wxMSW namespace in src/msw/dc.cpp to wxMSWImpl (which already is used elsewhere) fix this too?

I will try that to see if it will work; my computer is very slow, so might take awhile.

Tim S.

Changed 10 months ago by stahta01

Patch to change namespace wxMSW to wxMSWImpl

comment:3 in reply to: ↑ 1 Changed 10 months ago by stahta01

Replying to vadz:

Presumably wxMSW here is needed for compatibility with 2.6... Wouldn't renaming wxMSW namespace in src/msw/dc.cpp to wxMSWImpl (which already is used elsewhere) fix this too?

It seems to have worked; tested it by running make again after undoing other patch.
Did NOT have time to do a make clean followed by a make.

NOTE: I am just a C programmer; so, a C++ person needs to verify I did it right!

Tim S.

comment:4 Changed 10 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [75103]) Fix wxMSW build with WXWIN_COMPATIBILITY_2_6==1.

Avoid conflict between wxMSW symbol defined in wx/platinfo.h in this build
configuration and wxMSW namespace by renaming the latter to wxMSWImpl, which
is also consistent with the namespace name used elsewhere.

Closes #15624.

Note: See TracTickets for help on using tickets.