Copy link to clipboard
Copied
Hello,
Since I updated my VS2019, last Monday, June 28 (build 16.10.2) there is a compilation error in the file "xlocnum_hack_vs2019.h" with the error that the file contains calls to the function _Getloctxt() with 4 parameters, but that that function is defined in the Windows SDK file "xlocale" as having 5 parameters.
Error C2672 '_Getloctxt': no matching overloaded function found Ipp16 D:\Qpp-Development\InDesign\plugin_sdk_16.3.0.24\source\precomp\msvc\xlocnum_hack_vs2019.h 379
Error C2780 'int std::_Getloctxt(_InIt &,_InIt &,size_t,const _Elem *,const std::_Case_sensitive)': expects 5 arguments - 4 provided Ipp16 D:\Qpp-Development\InDesign\plugin_sdk_16.3.0.24\source\precomp\msvc\xlocnum_hack_vs2019.h 379
I am using the latest available ID SDK. Is there an updated version of the ID SDK coming soon to fix this ?
Very best regards,
Olivier
What is strange is that this was just a minor VS2019 update, from 16.10.1 to 16.10.2. No installation of a new Windows SDK or runtime.
In fact, the offending "xlocale" file (no file extension) is not in a Windows SDK folder, but rather in one of the internal VS2019 folders "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\include\".
I ended up patching the "xlocnum_hack_vs2019.h" ID SDK file (see "_MATCHING" for changes), as below (in case anyone else gets
...Copy link to clipboard
Copied
Copy link to clipboard
Copied
Use the compiler version and the Windows SDK headers version as specified in the InDesign SDK.
Copy link to clipboard
Copied
Hi Dirk,
I am using the SDK version 10.0.18362.0 as before, no change (see image below).
Is that not the correct one to use ?
Very best regards,
Olivier
Copy link to clipboard
Copied
That appears to be the value stored in your project or solution, what it wants/should be/when it originally was created. I do not know whether/when VS checks that value.
https://stackoverflow.com/questions/2665755/how-to-get-installed-windows-sdk-version
… gives some hints where to look for concrete version numbers. E.g. file "sdkddkver.h".
The bottom answer as of now also suggest to use "Retarget Solution" to list the available SDKs.
I would not expect that actually invoking the "Retarget Solution" operation will solve your problem, instead it will just update that setting of your screenshot and cause different trouble.
Above you wrote you were using an updated Windows SDK which broke your build.
Restore the Windows SDK to the one that works, and do the same for the IDE.
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
If you can't, e.g. because some other development project has colliding requirements, you can create a VM, or use a different physical machine / boot volume, and reinstall VS and Windows SDK to the versions specified in the SDK.
That sounds like an annoyance, and for me it is the reason why I mostly gave up on Windows, except for that one project that is married with one VM. In theory you can (or at least could) also install multiple IDE versions, toolsets, SDKs etc. in parallel, but I stopped these experiments after other collisions, that required me to revert ot a backup/snaphot, which broke the Windows license. Btw Microsoft's solution to that is the "Visual Studio Subscription", which (comparing to its predecessor "MSDN Subscription") has doubled the price (to account for added free "Azure" benefits that you won't need) while cutting the renewal time frame down from 3 to 1 year.
Quite similar problems also apply to Xcode, minus the license trouble (OSX is happy as long it runs on Mac hardware). There is a tool called xcode-select to choose between different versions, but it is useless when you can't run the vintage Xcode 3 / 4 / whatever on your more recent Mac. Yes, I recently supported CS3, CS5. Same solution - VMs or physical hardware. Everything else is for thrill seekers that find out the hard way that the new OS SDK version had subtle changes to some standard library, moving some fields around in an incompatible way.
Copy link to clipboard
Copied
What is strange is that this was just a minor VS2019 update, from 16.10.1 to 16.10.2. No installation of a new Windows SDK or runtime.
In fact, the offending "xlocale" file (no file extension) is not in a Windows SDK folder, but rather in one of the internal VS2019 folders "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\include\".
I ended up patching the "xlocnum_hack_vs2019.h" ID SDK file (see "_MATCHING" for changes), as below (in case anyone else gets this issue).
...
_Str.push_back(_Elem{});
_Str += _Punct_fac.truename(); // construct "\0false\0true"
// Olivier 1-july-2021: after VS2019 update,
// function _Getloctxt() now requires 5 parameters
_Case_sensitive _MATCHING = _Case_sensitive::_Yes;
switch (_Getloctxt(_First, _Last, 2, _Str.c_str(), _MATCHING)) {
// end- Olivier
case 0:
...
Very best regards,
Olivier