Copy link to clipboard
Copied
When I am buiding a plugin with SDK 19, I get the following error.
xlocnum_hack_vs2022_17_1.h(1193,64): error C2039: 'c_str': is not a member of 'std::locale'
Is there anyone who can guide me to solve this error?
Thank you!
1 Correct answer
The file "xlocnum_hack_vs2022_17_7.h" mentioned in your "xlocnum_hack.h" is not part of the official SDK and is probably someone's attempt at tweaking the default file to get it to work with VS2022 17.7. This used to be possible with minor adjustments, but the VS code has diverged too much since 17.4 and tweaking that file requires a lot of work with macros. I decided it was simpler to revert back to VS2022 17.4.
Copy link to clipboard
Copied
Hello,
Which minor build of VS2022 are you using ?
Did you tweak your "xlocnum_hack.h" file ? It used to be possible to tweak that file and the related header file "xlocnum_hack_vs2022_17_1.h", but recent updates to VS2022 makes this to complex and error-prone.
The ID18 and ID19 SDK will not compile with any version of Visual Studio above version 17.4.3. If you have updated VS2022 to a more recent version, such as 17.5 or 17.6 or 17.7, then you will need to uninstall VS2022 and use the Microsoft page which allows you to install a specific minor build of VS2022 from the past (https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history#updating-your-installat...).
Very best regards,
Olivier
Copy link to clipboard
Copied
I am using github runners for the builds and it uses VS2022 17.7.34031.279. My "xlocnum_hack.h" file is altered in this way.
Is there any way to use VS2022 17.7 in doing the builds that I can try? If not I think I have to look in to installing an earlier version of VS2022.
Copy link to clipboard
Copied
The file "xlocnum_hack_vs2022_17_7.h" mentioned in your "xlocnum_hack.h" is not part of the official SDK and is probably someone's attempt at tweaking the default file to get it to work with VS2022 17.7. This used to be possible with minor adjustments, but the VS code has diverged too much since 17.4 and tweaking that file requires a lot of work with macros. I decided it was simpler to revert back to VS2022 17.4.
Copy link to clipboard
Copied
Thank you Oliver

