How to convert std::string to System::String under Linux?

Viewed 75

A very simple C++ question:

const System::String foo = bar

where bar is std:string.

How do I convert bar to System::String? I know there are many answers already, but they all seem to be based on Microsoft libraries, like:

System::String^ result = msclr::interop::marshal_as<System::String^>(str.c_str());

I, however, don't have marshal_as. I need this to work under Linux (Ubuntu 20.04).

BTW, I'm not a C++ guy, so this whole thing is new to me.

0 Answers
Related