Targetting Windows XP with Windows SDK 8.x
Michael Stahl
mstahl at redhat.com
Fri Apr 17 08:43:48 PDT 2015
On 16.04.2015 10:09, Andras Timar wrote:
> Hi,
>
> In the past few days I made some experiments with LibreOffice 4.4.
> configure suggests that SDK version 7.1A should be used for targetting
> Windows XP. configure also says that SDK version 7.1A is not known to
> work with VS2013, and it is true. I could not build LibreOffice 4.4
> with VS2013 and SDK 7.1A, there were many compilation errors.
that must be specific to the 4.4 branch?
Win-x86_62-TDF on master builds with ´--with-windows-sdk=7.1A´
it's possible that the 4.4 branch does not actually fully support visual
studio 2013.
seems it's missing this commit - which should explain something:
commit 5225cd46919a028add3772564fd0d63e99078820
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Wed Dec 10 15:21:30 2014 +0100
define _USING_V110_SDK71_ when building with VS2013 against 7.1A SDK
perhaps looking through master changelog and searching for "2013" will
turn up more things...
> I found an article:
> https://tedwvc.wordpress.com/2014/01/01/how-to-target-xp-with-vc2012-or-vc2013-and-continue-to-use-the-windows-8-x-sdk/
>
> It says:
> "Say we’ve decided to use Windows 8.x SDK while still allowing our app
> to run on XP. Are there any options available? i.e. can you keep using
> the v110/v120 toolsets instead of the v110_xp/v120_xp toolsets? Yes,
> it turns out that Microsoft left a nice loophole in the code to do
> exactly that. Notice the mysterious define in the block of code above
> named _ATL_XP_TARGETING. Turns out this is an alternative way to
> support XP targeting while _USING_V110_SDK71_ is NOT defined. So if
> you really want to support XP while using Windows 8.x SDK, we simply
> need to ensure our code is built with _ATL_XP_TARGETING defined. The
> easiest way to do this is to add a /D_ATL_XP_TARGETING flag to our
> C/C++ command line options in project properties."
hmm... relying on some undocumented macro with unspecified effect that
could change in next VS service pack sounds a bit dubious...
probably there are other things in the headers that the macro won't affect?
> I added -D_ATL_XP_TARGETING flag to
> solenv/gbuild/platform/com_MSC_defs.mk instead of the last conditional
> flag $(if $(findstring
> 110_70,$(VCVER)_$(WINDOWS_SDK_VERSION)),-D_USING_V110_SDK71_), and I
> built LibreOffice 4.4 with VS2013 and SDK 8.1. It started on Windows
> XP. Then I reverted my patch, and made a full build again.
> Surprisingly, the resulting build also started on Windows XP.
>
> So my question is: how is that possible? What config does result a
> built which does not start on Windows XP then?
i don't think the problem was starting on Windows XP - more likely that
in some obscure cases some function is called that doesn't exist on XP.
i don't remember reading anywhere what exactly in the 8.x SDK would make
the resulting programs fail to run (or crash or whatever) on XP.
> I have not tried this with master. What is the difference between
> master and 4.4 in this regard?
master is very clear about it - with 8.x SDK, sal library will use
Vista-or-later functions instead of older ones that were deprecated in
the 8.1 SDK, so soffice will not start.
More information about the LibreOffice
mailing list