Copy link to clipboard
Copied
Brand new to C++ Plug In Development and trying to get the SDK Samples to run.
Using:
Indesign SDK 20.0.0.95
Indesign Debug Version 20.0.1D
Visual Studio 17.9.6
Can only get the "BasicLocalization" project to compile and run. The handful of other samples "WriteFishPrice, BasicDialog..." I tried all encounter the same build error of "_MAX_INT_DIG:undeclared identifier" in xlocnum_back_vs2022_17_1.h.
What is causing this and how do I fix it?
Copy link to clipboard
Copied
Open the SDK documents index page. Check the compiler version in the requirements. I don't have it around right now. Your 17.9.6 might be slightly off, when the header file already is named …17_1.h
The xlocnum hack is notorious for compiler version dependency, down to the minor version number.
You'd either install the correct compiler version (at least something closer, e.g. 17.1.x), or hope that someone has provided an updated version of xlocnum_hack (e.g. in the developer area hosted on the prerelease site) and your use of a not specified compiler does not break at another point.
Apply similar considerations for the Xcode version. Xcode is also picky about the OS version - even a dot version can break things.
While major VStudio versions often can coexist, I've experienced a few times that a newer version broke the toolset of an older one. Installing older versions on top of a newer one is worse. I'm using virtual machines to preserve and isolate working environments, others sit on a pile of hardware - worth a second thought given recent changes at VMware.
Copy link to clipboard
Copied
I've posted my version numbers in the pictures. Can someone please confirm all my version numbers are correct?
Copy link to clipboard
Copied
Dirk, in addition to my last post, I guess I'm still trying to understand that the 20.0 SDK documentation says to use VS 17.9.6, but - if I'm interpreting your post correctly - I should just ignore what's in the SDK documentation and install the VS version that comes closest to the 17.1 version referenced in the xlocnum file name? So, I should try with VS 17.1.x (which is what I'm downloading to try now)?
Copy link to clipboard
Copied
As I wrote above, I did not have access to the SDK documentation.
Besides my Windows host is currently blocked with a long running job, so I can't try it myself.
Unfortunately I'm far behind with version 20.
Use what the SDK index.html says - just confirmed it is v17.9.6 .
It is just a common problem to use the latest compiler version instead of the specified one.
That difference in the header name is still strange, I'd start looking why you got there - is your project pointing to an older SDK? 17.1 was used by 2023 and 2024. When I look at my copy of SDK 20 build 95, there is an xlocnum_hack_vs2022_17_9_6.h and it is addressed by the _MSC_VER cascade in source/prepcomp/msvc/xlocnum_hack.h
So please also see what _MSC_VER yields for your project.
Copy link to clipboard
Copied
Yes, I see the 17_9_6 xlocnum file in my folders as well. However, the error I was getting was from a sample plugin that was using the 17_1_6 version.
Oddly, I tried going back to VS 17.1.6 and that has cleared up my issues and I'm able to run the samples. So, VS 17.1.6 running SDK 20 works while VS 17.9.6 running SDK 20 doesn't work. This doesn't seem right based on the documentation, but it's somehow working.
Copy link to clipboard
Copied
There is the VStudio version and there is a matching toolset - compiler and supplied files.
If you had an older VStudio V17 around, its associated toolset might still get used, and the project file itself won't tell - both using <PlatformToolset>v143</PlatformToolset>.
See MS devblogs how to display the more detailed MSVC (!) compiler version in project properties dialog of 17.10 *, and how it translates to _MSC_VER . You may have the 19.31.xx causing _MSC_VER 1931 or something similarily odd.
* I hope that approach also works with 17.9.6
The displayed value should be picked up from the actual toolset / compiler unless you manually override it.
If this guess is confirmed, uninstall entire VStudio 2022, manually purge files from the location mentioned in the article and so forth.
Reminder to myself - definitely use a clean VM for VS 17.9.6 😉
Copy link to clipboard
Copied
Although the samples run, I do get the "Plugin is from build 95" error in the attached picture when VS launches Indesign. I have to say "No" for every plugin and then Indesign will run with the samples enabled. Any ideas on what might be causing this?
Copy link to clipboard
Copied
Check the build number of your InDesign debug build.
Open the extended about dialog via the Help >> "About InDesign" menu, with all modifier keys down.
Copy link to clipboard
Copied
Make sure you are using the following -
VS 2022 - Version 17.9.6
Win SDK - 10.0.22621.0
Copy link to clipboard
Copied
Where do you see that the Win SDK should be 10.0.22621.0?
Copy link to clipboard
Copied
@ryany27707769 - Read the SDK Documentation.
Also, you have validate by opening sample projects provided in the SDK.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now