iPlug2 Forum

Compile and runtime errors in last version of iPlug2 master

A few hours ago I tried the latest version of iPlug2 master. There was a build error while compiling in Visual Studio 2019 version 16.0.0:
Error LNK2001 unresolved external symbol ""public: static class std::locale::id std::codecvt<char16_t,char,struct _Mbstatet>::id" (?id@?$codecvt@_SDU_Mbstatet@@@std@@2V0locale@2@A)"

I tried to make corrections in the ITextEntryControl.cpp file:
#ifdef _MSC_VER
- #if (_MSC_VER >= 1900 /* VS 2015*/) && (_MSC_VER < 1920 /* pre VS 2019 /)
+ #if (_MSC_VER >= 1900 /
VS 2015*/) && (_MSC_VER <= 1920 /* VS 2019 */)
std::locale::id std::codecvt<char16_t, char, _Mbstatet>::id;
#endif
#endif

At the same time, the assembly was successful, however, when the plug-in was started in debug mode, a run-time error unexpectedly occurred in a completely wrong place, where in principle there could be no error - at least I had never encountered errors when initializing structures - const IBlend BLEND_75 = IBlend(EBlend::Default, 0.75f); , where there are no actions in the constructors other than assigning values.

How to make the plugin work without errors, I can’t imagine it possible, maybe someone has already encountered a similar error?

Yes, I had this when experimenting with MSVC BuilTools. In the end, it was gone. I don’t remember exactly how I think I made additional #define _MSC_VER 1930 somewhere in my files…
Удачи
Alex

Does this method get rid of a runtime error? Everything is OK with compilation.