Hi all,
I’m trying to use a Shared Library (.so) in a Unreal Project. I already have tried Unreal 4.14.x, 4.15.x. 4.16.x, 4.17.x, 4.18.0 and I always have one problem or another.
At the end, I came back to Unreal 4.14.3
and the problem that I’m having is that Unreal can’t find a symbol when I run my external_library::init
.
With the name of the symbol raised on the error, I used c++filt SYMBOL_HERE
to demangle.
The demangled symbol is:
external_library::init(int&, char**, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int)
Using nm
and c++filt
I was able to demangle all symbols on the external_library
, and the demangled version of external_libray::init
found on the .so
is:
external_library::init(int&, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int)
If you use diff
(or the graphical version called meld
), you can see the Unreal
is using std::__1::basic_string
but the compiled .so
library is using std::__cxx11::basic_string
, which means c++11
.
In order to try to solve this problem, I have changed LinuxToolChain.cs
to pass the parameter -std=c++11
when compiling my Unreal Project, but this didn’t solve the problem, because Unreal keeps using std::__1::basic_string
instead of std::__cxx11::basic_string
.
Then my question is: how can I force unreal use c++11
, specially for std::string
?
I already have tried everything that I can but I couldn’t find a solution.