I haven’t worked on the VST2 distribution and haven’t used the LPTSTR
macro/typedef, but I encountered a similar problem with code portability between the standalone app and VST3 build. In the APP project, TCHAR
is a typedef for char
, so it can be directly converted to a string. In the VST3 project, TCHAR
is wchar_t
and cannot be automatically converted to std::string
. I got around this by converting it the wchar_t
array to a wstring
, converting that to bytes, and then converting that to a regular string for further use.
As for what solution is best for you - that’s a general C++ issue. The first result on StackOverflow for “convert wchar_t to string” worked for me.