Wx Universal does not compile ever since Wx 3.X.X

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
cristincc
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Apr 28, 2021 4:03 pm

Wx Universal does not compile ever since Wx 3.X.X

Post by cristincc »

Hello,

I'm trying to compile wxWidgets with the "WXUNIV=1" and it doesn't seem to work on any 3.X.X version. The first version that worked was 2.9.5. Sadly this version is too old to replace the version that I'm using currently (3.1.1).

The steps I'm using to compile are based on https://docs.wxwidgets.org/trunk/plat_msw_install.html.

1. CD to "wxWidgets-3.1.5\build\msw" with the VS command line and run "nmake /f makefile.vc BUILD=release SHARED=1 TARGET_CPU=X86 WXUNIV=1".

This will give the following error:

D:\wxWidgets-3.1.5\include\wx/msw/chkconf.h(34): fatal error C1189: #error: "wxUSE_WINRT must be defined."
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29333\bin\HostX86\x86\cl.EXE"' : return code '0x2'
Stop.

The following code from "msw/chkconf.h(" is causing the error:

#ifndef wxUSE_WINRT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WINRT must be defined."
# else
# define wxUSE_WINRT 0
# endif
#endif /* !defined(wxUSE_ACTIVEX) */

2. Trying to undef wxABORT_ON_CONFIG_ERROR (I know it's not recommended, but it was worth a try) will cause linking errors.

Any idea what might be causing this?

Thanks,
Cristian
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by doublemax »

First of all, wxUniversal (i assume you have a good reason to use it) is hardly ever tested, so be prepared for more problems to come :)

However, the "wxUSE_WINRT must be defined." probably just means that you're using a setup.h from an older wx version.
Use the source, Luke!
cristincc
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Apr 28, 2021 4:03 pm

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by cristincc »

Hi doublemax, thanks for replying :D. The reason I'm trying to use universal wxWidgets is because I'm trying to fully support dark mode on Windows and the version that uses native controls does not allow fine access to just about every color.

I think the nmake command should be using "D:\wxWidgets-3.1.5\include\wx\msw\setup.h" which I haven't changed since cloning the repo.

If I #define these three macros myself:

wxUSE_WINRT

wxUSE_TASKBARBUTTON

wxUSE_DBGHELP

I'll still run into the same linking errors as before, related to wxGraphicsRenderer.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by doublemax »

I think the nmake command should be using "D:\wxWidgets-3.1.5\include\wx\msw\setup.h" which I haven't changed since cloning the repo.
The first place it looks for is in the lib directory, e.g. <wxdir>/lib/vc_lib/mswud/wx/setup.h
The excact path depends on the compiler and build options. Delete old builds manually or use make clean.
If I #define these three macros myself:

wxUSE_WINRT

wxUSE_TASKBARBUTTON

wxUSE_DBGHELP
Not a good idea. These may silence the initial error, but break something else.
I'll still run into the same linking errors as before, related to wxGraphicsRenderer.
The first error you posted was a compiler error, not a linker error. Like a said, you'll probably run into many of these problems, you have to tackle them one by one. (Without any guarantee of success).

If this is all about dark mode, there is some development going on. Read (and maybe participate) here: https://groups.google.com/g/wx-users/c/2V-UlBfmCSw
Use the source, Luke!
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by stahta01 »

I was able to confirm the build problem with a recent git main branch build using MinGW64 GCC 64 bit.
Edit: Testing an 3.1.5 version from git main branch.

I will look and see if there is a easy fix to the problem; I suspect the setup.h redesign is the cause of the problem.
Edit: There is currently no evidence that the setup.h redesign is the cause.

Tim S.
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by stahta01 »

I am trying to build git main branch about 25 commits behind the tip with below patch.
It has made it to the core section of wxWidgets; my laptop is getting too hot and I will be stopping for about 8 or more hours.

Tim S.

Code: Select all

From 0a4fbb3ab3ee7f1a9b99f861b11464ea8dbab930 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <[email protected]>
Date: Wed, 28 Apr 2021 19:48:34 -0400
Subject: TEST ONLY: Attempt to fix universal build

---
 include/wx/univ/setup.h | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h
index 6757c978aa..53d3dc564b 100644
--- a/include/wx/univ/setup.h
+++ b/include/wx/univ/setup.h
@@ -1641,6 +1641,19 @@
 // Recommended setting: 1, required by wxMediaCtrl
 #define wxUSE_ACTIVEX 1
 
+// Enable WinRT support
+//
+// Default is 1 for compilers which support it, i.e. VS2012+ currently. If you
+// use an earlier MSVC version or another compiler and installed the necessary
+// SDK components manually, you need to change this setting.
+//
+// Recommended setting: 1
+#if defined(_MSC_VER) && _MSC_VER >= 1700 && !defined(_USING_V110_SDK71_)
+    #define wxUSE_WINRT 1
+#else
+    #define wxUSE_WINRT 0
+#endif
+
 // wxDC caching implementation
 #define wxUSE_DC_CACHEING 1
 
@@ -1697,6 +1710,15 @@
 // Recommended setting: 1, set to 0 for a tiny library size reduction
 #define wxUSE_TASKBARICON_BALLOONS 1
 
+// Set this to 1 to enable following functionality added in Windows 7: thumbnail
+// representations, thumbnail toolbars, notification and status overlays,
+// progress indicators and jump lists.
+//
+// Default is 1.
+//
+// Recommended setting: 1, set to 0 for a tiny library size reduction
+#define wxUSE_TASKBARBUTTON 1
+
 // Set to 1 to compile MS Windows XP theme engine support
 #define wxUSE_UXTHEME           1
 
@@ -1733,6 +1755,18 @@
 // Crash debugging helpers
 // ----------------------------------------------------------------------------
 
+// Set this to 1 to use dbghelp.dll for providing stack traces in crash
+// reports.
+//
+// Default is 1 if the compiler supports it, 0 for old MinGW.
+//
+// Recommended setting: 1, there is not much gain in disabling this
+#if defined(__VISUALC__) || defined(__MINGW64_TOOLCHAIN__)
+    #define wxUSE_DBGHELP 1
+#else
+    #define wxUSE_DBGHELP 0
+#endif
+
 // Set this to 1 to be able to use wxCrashReport::Generate() to create mini
 // dumps of your program when it crashes (or at any other moment)
 //
-- 
2.31.1.windows.1

stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by stahta01 »

I got to the core lib linking errors.

Trying this patch; but, the hour break was not enough to cool off laptop; will be hibernating it in a few minutes.

Code: Select all

From 5cf38d5097994afdc04a517a777916ecdaa84b93 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <[email protected]>
Date: Wed, 28 Apr 2021 22:57:24 -0400
Subject: TEST ONLY: Disable wxUSE_GRAPHICS_CONTEXT

---
 include/wx/univ/setup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h
index 53d3dc564b..babacb9e60 100644
--- a/include/wx/univ/setup.h
+++ b/include/wx/univ/setup.h
@@ -834,7 +834,7 @@
 // here as this file is included from wx/platform.h before they're defined.
 #if defined(_MSC_VER) || \
     (defined(__MINGW32__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 8))
-#define wxUSE_GRAPHICS_CONTEXT 1
+#define wxUSE_GRAPHICS_CONTEXT 0
 #else
 // Disable support for other Windows compilers, enable it if your compiler
 // comes with new enough SDK or you installed the headers manually.
-- 
2.31.1.windows.1

cristincc
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Apr 28, 2021 4:03 pm

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by cristincc »

Thanks! I've tried updating the setup.h file from the lib directory with the three missing defines. However, I still the these linker errors (same as before, I know the WinRT one was compiler related).

Here are the errors on pastebin (can't seem to post them directly): https://pastebin.pl/view/f65ae17c
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by doublemax »

Try setting wxUSE_GRAPHICS_CONTEXT to 0 in setup.h
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by ONEEYEMAN »

Hi,
As Vadim told you on SO, be prepared to fix issues that will come when using universal.
Also, did you check the thread I mentioned there?

Thank you.
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by stahta01 »

My current test patch is below. Tim S.

Code: Select all

From 8395ac7ec687c40d03a052edb20198d0adb9fb3c Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <[email protected]>
Date: Wed, 28 Apr 2021 19:48:34 -0400
Subject: TEST ONLY: Attempt to fix universal build

Add defines of wxUSE_WINRT, wxUSE_TASKBARBUTTON, and wxUSE_DBGHELP to wx/univ/setup.h
And, disable wxUSE_GRAPHICS_CONTEXT and wxUSE_TASKBARBUTTON in wx/univ/chkconf.h
---
 include/wx/univ/chkconf.h | 16 ++++++++++++++++
 include/wx/univ/setup.h   | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/include/wx/univ/chkconf.h b/include/wx/univ/chkconf.h
index eda435341c..98f326ff3f 100644
--- a/include/wx/univ/chkconf.h
+++ b/include/wx/univ/chkconf.h
@@ -10,6 +10,22 @@
 #ifndef _WX_UNIV_CHKCONF_H_
 #define _WX_UNIV_CHKCONF_H_
 
+#if wxUSE_TASKBARBUTTON
+    /*
+        wxMSW has core library linking error when wxUSE_TASKBARBUTTON is true.
+    */
+    #undef wxUSE_TASKBARBUTTON
+    #define wxUSE_TASKBARBUTTON 0
+#endif /* wxUSE_TASKBARBUTTON */
+
+#if wxUSE_GRAPHICS_CONTEXT
+    /*
+        wxMSW has core library linking error when wxUSE_GRAPHICS_CONTEXT is true.
+    */
+    #undef wxUSE_GRAPHICS_CONTEXT
+    #define wxUSE_GRAPHICS_CONTEXT 0
+#endif /* wxUSE_GRAPHICS_CONTEXT */
+
 #if wxUSE_OWNER_DRAWN
     /*
         It is not clear if owner-drawn code makes much sense for wxUniv in the
diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h
index 6757c978aa..53d3dc564b 100644
--- a/include/wx/univ/setup.h
+++ b/include/wx/univ/setup.h
@@ -1641,6 +1641,19 @@
 // Recommended setting: 1, required by wxMediaCtrl
 #define wxUSE_ACTIVEX 1
 
+// Enable WinRT support
+//
+// Default is 1 for compilers which support it, i.e. VS2012+ currently. If you
+// use an earlier MSVC version or another compiler and installed the necessary
+// SDK components manually, you need to change this setting.
+//
+// Recommended setting: 1
+#if defined(_MSC_VER) && _MSC_VER >= 1700 && !defined(_USING_V110_SDK71_)
+    #define wxUSE_WINRT 1
+#else
+    #define wxUSE_WINRT 0
+#endif
+
 // wxDC caching implementation
 #define wxUSE_DC_CACHEING 1
 
@@ -1697,6 +1710,15 @@
 // Recommended setting: 1, set to 0 for a tiny library size reduction
 #define wxUSE_TASKBARICON_BALLOONS 1
 
+// Set this to 1 to enable following functionality added in Windows 7: thumbnail
+// representations, thumbnail toolbars, notification and status overlays,
+// progress indicators and jump lists.
+//
+// Default is 1.
+//
+// Recommended setting: 1, set to 0 for a tiny library size reduction
+#define wxUSE_TASKBARBUTTON 1
+
 // Set to 1 to compile MS Windows XP theme engine support
 #define wxUSE_UXTHEME           1
 
@@ -1733,6 +1755,18 @@
 // Crash debugging helpers
 // ----------------------------------------------------------------------------
 
+// Set this to 1 to use dbghelp.dll for providing stack traces in crash
+// reports.
+//
+// Default is 1 if the compiler supports it, 0 for old MinGW.
+//
+// Recommended setting: 1, there is not much gain in disabling this
+#if defined(__VISUALC__) || defined(__MINGW64_TOOLCHAIN__)
+    #define wxUSE_DBGHELP 1
+#else
+    #define wxUSE_DBGHELP 0
+#endif
+
 // Set this to 1 to be able to use wxCrashReport::Generate() to create mini
 // dumps of your program when it crashes (or at any other moment)
 //
-- 
2.31.1.windows.1

stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by stahta01 »

This worked to build wxWidgets for me. Tim S.

Feel free to remove my name and use the patch to report a possible build fix to the wxWidgets team.

I have lost my wxTrac password and maybe username.

I did do an PR here https://github.com/wxWidgets/wxWidgets/pull/2355

Tim S.

Code: Select all

From 7b2bc2087ac2aa708cdad54b7ed27e4e95318106 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <[email protected]>
Date: Wed, 28 Apr 2021 19:48:34 -0400
Subject: wxUniv: Fix universal build under windows

Add standard defines of wxUSE_WINRT and wxUSE_DBGHELP to wx/univ/setup.h
And, set wxUSE_TASKBARBUTTON to zero in wx/univ/setup.h
Also, disable wxUSE_GRAPHICS_CONTEXT in wx/msw/chkconf.h
---
 include/wx/msw/chkconf.h |  8 ++++++++
 include/wx/univ/setup.h  | 27 +++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/include/wx/msw/chkconf.h b/include/wx/msw/chkconf.h
index f3e847deb8..861482a845 100644
--- a/include/wx/msw/chkconf.h
+++ b/include/wx/msw/chkconf.h
@@ -225,6 +225,14 @@
 #   endif /* wxUSE_ACTIVEX */
 #endif /* __WINE__ */
 
+#if wxUSE_GRAPHICS_CONTEXT && defined(__WXUNIVERSAL__)
+    /*
+        wxMSW has core library linking error when wxUniv and wxUSE_GRAPHICS_CONTEXT is true.
+    */
+    #undef wxUSE_GRAPHICS_CONTEXT
+    #define wxUSE_GRAPHICS_CONTEXT 0
+#endif /* wxUSE_GRAPHICS_CONTEXT && defined(__WXUNIVERSAL__) */
+
 /*
     Currently wxUSE_GRAPHICS_CONTEXT is only enabled with MSVC by default, so
     only check for wxUSE_ACTIVITYINDICATOR dependency on it if it can be
diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h
index 6757c978aa..3370969afa 100644
--- a/include/wx/univ/setup.h
+++ b/include/wx/univ/setup.h
@@ -1641,6 +1641,19 @@
 // Recommended setting: 1, required by wxMediaCtrl
 #define wxUSE_ACTIVEX 1
 
+// Enable WinRT support
+//
+// Default is 1 for compilers which support it, i.e. VS2012+ currently. If you
+// use an earlier MSVC version or another compiler and installed the necessary
+// SDK components manually, you need to change this setting.
+//
+// Recommended setting: 1
+#if defined(_MSC_VER) && _MSC_VER >= 1700 && !defined(_USING_V110_SDK71_)
+    #define wxUSE_WINRT 1
+#else
+    #define wxUSE_WINRT 0
+#endif
+
 // wxDC caching implementation
 #define wxUSE_DC_CACHEING 1
 
@@ -1697,6 +1710,8 @@
 // Recommended setting: 1, set to 0 for a tiny library size reduction
 #define wxUSE_TASKBARICON_BALLOONS 1
 
+#define wxUSE_TASKBARBUTTON 0
+
 // Set to 1 to compile MS Windows XP theme engine support
 #define wxUSE_UXTHEME           1
 
@@ -1733,6 +1748,18 @@
 // Crash debugging helpers
 // ----------------------------------------------------------------------------
 
+// Set this to 1 to use dbghelp.dll for providing stack traces in crash
+// reports.
+//
+// Default is 1 if the compiler supports it, 0 for old MinGW.
+//
+// Recommended setting: 1, there is not much gain in disabling this
+#if defined(__VISUALC__) || defined(__MINGW64_TOOLCHAIN__)
+    #define wxUSE_DBGHELP 1
+#else
+    #define wxUSE_DBGHELP 0
+#endif
+
 // Set this to 1 to be able to use wxCrashReport::Generate() to create mini
 // dumps of your program when it crashes (or at any other moment)
 //
-- 
2.31.1.windows.1

stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by stahta01 »

My PR has undergone a major re-write; I hope it is done being changed.

Code: Select all

From 7759e637ca70cc813a1350c0c133476555a3d8f9 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <[email protected]>
Date: Wed, 28 Apr 2021 19:48:34 -0400
Subject: wxUniv: Fix universal build under windows

Add standard define of wxUSE_DBGHELP to wx/univ/setup.h
And, set wxUSE_WINRT and wxUSE_TASKBARBUTTON to zero in wx/univ/setup.h
Also, enable wxUSE_GRAPHICS_GDIPLUS in wx/msw/chkconf.h
---
 include/wx/msw/chkconf.h | 14 ++++++++++++++
 include/wx/univ/setup.h  | 16 ++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/include/wx/msw/chkconf.h b/include/wx/msw/chkconf.h
index f3e847deb8..ad47160aea 100644
--- a/include/wx/msw/chkconf.h
+++ b/include/wx/msw/chkconf.h
@@ -472,6 +472,20 @@
 #   define wxUSE_POSTSCRIPT 1
 #endif
 
+#if wxUSE_GRAPHICS_CONTEXT && defined(__WXUNIVERSAL__) && !defined(wxUSE_GRAPHICS_GDIPLUS)
+#   define wxUSE_GRAPHICS_GDIPLUS 1
+#endif
+#if !wxUSE_GRAPHICS_GDIPLUS
+#   if wxUSE_GRAPHICS_CONTEXT
+#       ifdef wxABORT_ON_CONFIG_ERROR
+#           error "wxUSE_GRAPHICS_CONTEXT requires wxUSE_GRAPHICS_GDIPLUS"
+#       else
+#           undef wxUSE_GRAPHICS_GDIPLUS
+#           define wxUSE_GRAPHICS_GDIPLUS 1
+#       endif
+#   endif
+#endif
+
 /*
     IPv6 support requires winsock2.h, but the default of wxUSE_WINSOCK2 is 0.
     Don't require changing it explicitly and just turn it on automatically if
diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h
index e4cf8b201d..c5443eb071 100644
--- a/include/wx/univ/setup.h
+++ b/include/wx/univ/setup.h
@@ -1637,6 +1637,8 @@
 // Recommended setting: 1, required by wxMediaCtrl
 #define wxUSE_ACTIVEX 1
 
+#define wxUSE_WINRT 0
+
 // wxDC caching implementation
 #define wxUSE_DC_CACHEING 1
 
@@ -1693,6 +1695,8 @@
 // Recommended setting: 1, set to 0 for a tiny library size reduction
 #define wxUSE_TASKBARICON_BALLOONS 1
 
+#define wxUSE_TASKBARBUTTON 0
+
 // Set to 1 to compile MS Windows XP theme engine support
 #define wxUSE_UXTHEME           1
 
@@ -1729,6 +1733,18 @@
 // Crash debugging helpers
 // ----------------------------------------------------------------------------
 
+// Set this to 1 to use dbghelp.dll for providing stack traces in crash
+// reports.
+//
+// Default is 1 if the compiler supports it, 0 for old MinGW.
+//
+// Recommended setting: 1, there is not much gain in disabling this
+#if defined(__VISUALC__) || defined(__MINGW64_TOOLCHAIN__)
+    #define wxUSE_DBGHELP 1
+#else
+    #define wxUSE_DBGHELP 0
+#endif
+
 // Set this to 1 to be able to use wxCrashReport::Generate() to create mini
 // dumps of your program when it crashes (or at any other moment)
 //
-- 
2.31.1.windows.1

Tim S.
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: Wx Universal does not compile ever since Wx 3.X.X

Post by stahta01 »

Finally got a approved edit.

Code: Select all

From e80ab67b546b24692c58808b2f0d3f5e7f188d34 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <[email protected]>
Date: Sat, 1 May 2021 08:01:36 -0400
Subject: Fix wxUniv/MSW build by defining MSW-specific wxUSE_XXX options

Add definitions of the missing MSW-specific options to wx/univ/setup.h
to avoid errors in wx/msw/chkconf.h when building wxUniv.

Closes https://github.com/wxWidgets/wxWidgets/pull/2355
---
 include/wx/univ/setup.h | 45 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h
index e4cf8b201d..86519bc9f7 100644
--- a/include/wx/univ/setup.h
+++ b/include/wx/univ/setup.h
@@ -1608,6 +1608,35 @@
 /* --- end common options --- */
 
 /* --- start MSW options --- */
+// ----------------------------------------------------------------------------
+// Windows-specific backends choices
+// ----------------------------------------------------------------------------
+
+// The options here are only taken into account if wxUSE_GRAPHICS_CONTEXT is 1.
+
+// Enable support for GDI+-based implementation of wxGraphicsContext.
+//
+// Default is 1.
+//
+// Recommended setting: 1 if you need to support XP, as Direct2D is not
+// available there.
+#define wxUSE_GRAPHICS_GDIPLUS wxUSE_GRAPHICS_CONTEXT
+
+// Enable support for Direct2D-based implementation of wxGraphicsContext.
+//
+// Default is 1 for compilers which support it, i.e. VC10+ currently. If you
+// use an earlier MSVC version or another compiler and installed the necessary
+// SDK components manually, you need to change this setting.
+//
+// Recommended setting: 1 for faster and better quality graphics under Windows
+// 7 and later systems (if wxUSE_GRAPHICS_GDIPLUS is also enabled, earlier
+// systems will fall back on using GDI+).
+#if defined(_MSC_VER) && _MSC_VER >= 1600
+    #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT
+#else
+    #define wxUSE_GRAPHICS_DIRECT2D 0
+#endif
+
 // ----------------------------------------------------------------------------
 // Windows-only settings
 // ----------------------------------------------------------------------------
@@ -1637,6 +1666,8 @@
 // Recommended setting: 1, required by wxMediaCtrl
 #define wxUSE_ACTIVEX 1
 
+#define wxUSE_WINRT 0
+
 // wxDC caching implementation
 #define wxUSE_DC_CACHEING 1
 
@@ -1693,6 +1724,8 @@
 // Recommended setting: 1, set to 0 for a tiny library size reduction
 #define wxUSE_TASKBARICON_BALLOONS 1
 
+#define wxUSE_TASKBARBUTTON 0
+
 // Set to 1 to compile MS Windows XP theme engine support
 #define wxUSE_UXTHEME           1
 
@@ -1729,6 +1762,18 @@
 // Crash debugging helpers
 // ----------------------------------------------------------------------------
 
+// Set this to 1 to use dbghelp.dll for providing stack traces in crash
+// reports.
+//
+// Default is 1 if the compiler supports it, 0 for old MinGW.
+//
+// Recommended setting: 1, there is not much gain in disabling this
+#if defined(__VISUALC__) || defined(__MINGW64_TOOLCHAIN__)
+    #define wxUSE_DBGHELP 1
+#else
+    #define wxUSE_DBGHELP 0
+#endif
+
 // Set this to 1 to be able to use wxCrashReport::Generate() to create mini
 // dumps of your program when it crashes (or at any other moment)
 //
-- 
2.31.1.windows.1

Post Reply