Skip to main content
Inspiring
October 4, 2023
Answered

Error with xlocnum_hack_vs2022_17_1.h

  • October 4, 2023
  • 1 reply
  • 1194 views

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!

This topic has been closed for replies.
Correct answer Olivier Beltrami

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.

1 reply

Olivier Beltrami
Legend
October 4, 2023

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-installation-to-a-specific-release).

Very best regards,

Olivier

Inspiring
October 4, 2023

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. 

 

Olivier Beltrami
Olivier BeltramiCorrect answer
Legend
October 4, 2023

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.