Build wxMSW with NMAKE without wxUSE_WINRT

43 views
Skip to first unread message

ro...@uberware.net

unread,
Oct 18, 2017, 7:02:32 PM10/18/17
to wx-u...@googlegroups.com

I need to customize my build to exclude WinRT support. I see a lovely wxUSE_WINRT variable in the code, but I cannot figure out how to build with NMAKE to set wxUSE_WINRT=0.

 

Currently I use this command to build:

 

nmake -f makefile.vc TARGET_CPU=amd64 UNICODE=1 SHARED=1 MONOLITHIC=1 VENDOR=x _SECURE_SCL=0

 

adding wxUSE_WINRT=0 to the end of that did not work. I’m not an expert and MSVC command line usage, so how am I supposed to set this to 0 in order to build the way I need?

Thank you for your help,

-robin

 

Robin Scher  |  Uberware  |  213.448.0443  |  ro...@uberware.net  |  www.uberware.net

 

Vadim Zeitlin

unread,
Oct 19, 2017, 6:23:28 PM10/19/17
to wx-u...@googlegroups.com
On Wed, 18 Oct 2017 16:02:28 -0700 wrote:

> I need to customize my build to exclude WinRT support. I see a lovely
> wxUSE_WINRT variable in the code, but I cannot figure out how to build with
> NMAKE to set wxUSE_WINRT=0.

I'm afraid you can't set it from nmake command line, you will need to edit
your local wx/msw/setup.h to set it to 0. Most of the build options can
only be set like this, make options are only used for fundamental things or
those that can't be done only in the code, for whatever reason.

BTW, what's your motivation for disabling this code in the first place?

Regards,
VZ

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

ro...@uberware.net

unread,
Oct 20, 2017, 3:25:04 AM10/20/17
to wx-u...@googlegroups.com
I have to build without WinRT support because I have to build without
Unicode to support some very old code, and current wxWidgets fails to build
without Unicode in the WinRT stuff. I was trying to be clever and find a way
to disable it in my build script instead of having to manually hack the
setup file. I did eventually get it to build by command line with:

NMAKE ... CXXFLAGS=/DwxUSE_WINRT#0

But it's a bad idea and it generates a lot of warnings about duplicate
definitions and I'm probably lucky it worked.

Thank you,
-robin

Robin Scher | Uberware | 213.448.0443 | ro...@uberware.net |
www.uberware.net

Vadim Zeitlin

unread,
Oct 20, 2017, 5:49:26 AM10/20/17
to wx-u...@googlegroups.com
On Fri, 20 Oct 2017 00:24:59 -0700 wrote:

> I have to build without WinRT support because I have to build without
> Unicode to support some very old code, and current wxWidgets fails to build
> without Unicode in the WinRT stuff.

It would be better to fix these errors. I can't say I'm highly motivated
to work on fixing ANSI builds problems, but I'll try to do it before 3.1.1
release. Of course, if you can submit a (probably simple) patch fixing
them, it would be very helpful.

BTW, I'd be also curious to know what's the problem with using the old
code with the Unicode build. It's supposed to be 99% compatible with the
old ANSI wx versions, have you found some new incompatibility or are you
just running into one of the relatively esoteric ones already mentioned in
the change log?
Reply all
Reply to author
Forward
0 new messages