update xlocnum hack header by copying over the header from your Visual Studio installation
Copy link to clipboard
Copied
Getting this error when sample SDK plugins are build in Visual Studio 2022 for InDesign2023. I have multiple Visual Studio(2019 and 2022).
(#error:- update xlocnum hack header by copying over the header from your Visual Studio installation and applying the same changes as to the previous versions. Be careful, this header also changes between minor versions of Visual Studio. MSC_VER was: " VALUE_TO_STRING(_MSC_VER))
Copy link to clipboard
Copied
Hello,
This is an issue with each new version of the SDK and needs to be tweaked.
Here is the file I use with the updated version of VS2022 and the plugin_sdk_18.0.0.311.
You will need to change the extension of the attached from TXT to H.
Very best regards,
Olivier
Copy link to clipboard
Copied
I resolved my issue by updating the value of _MSC_VER according to the version of visual studio, I found the _MSC_VER details at https://dev.to/yumetodo/list-of-mscver-and-mscfullver-8nd
I using the Visual Studio 2022 (vs 17.3.6)
in xlocnum_hack.h file has:- "_MSC_VER >= 1931 && MSC_VER < 1932"
and I replaced the value - "_MSC_VER >= 1931 && MSC_VER < 1934"
Copy link to clipboard
Copied
I am using Visual Studio 2022(vs 17.8.2)
in xlocnum_hack.h file has:- "_MSC_VER >= 1931 && MSC_VER < 1932"
and I replaced the value - "_MSC_VER >= 1931 && MSC_VER < 1939"
after that compilation got failed I am getting some errors. The screenshots of errors are attached below.
Could anyone please help me to resolve the issue.
Copy link to clipboard
Copied
Turning off the fire alarm does not magically let the smoke disappear.
Use the VStudio and toolset version specified in the InDesign SDK.
Copy link to clipboard
Copied
You cannot build using either of the v18 or v19 SDK with Visual Studio 2022 Version 17.5 or above. You need to downgrade to VS 2022 version 17.4 or below. The installers for previous minor builds of Visual Studio can be found at https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history.
Very best regards,
Olivier
Copy link to clipboard
Copied
path of xlocnum_hack.h file - <SDK>/source/precomp/msvc
Copy link to clipboard
Copied
Strange, I never encountered this issue and even if I may have I don't remember making any changes in the SDK header files. @Olivier Beltrami are you sure you were not able to resolve this in any other way and your developement environment was exactly as recommended by the SDK?
-Manan
Copy link to clipboard
Copied
@Manan Joshi My developement environment is exactly as recommended by the SDK, except that the SDK recommends using a "frozen version" of the Visual Studio UI, without any of the more recent security patches. But, personally, I prefer to use the Visual Studio UI with all the latest security patches. These updates to the Visual Studio UI are the cause for the need to tweak the xlocnum_hack.h file.
Copy link to clipboard
Copied
There in is the difference. I prefer freezing VS to whatever is recommended and be done with it(never hit the update button is the mantra I follow). I mainly use a MAC so I just wish if the WIN setup churns out a build without hassle then I am fine with it.
-Manan