Std::string link error for px4fmu

Hi,
I created a new module for PX4 that uses std::string. When I tested it in the posix build, it works fine. Now, I’m trying to build the px4fmu-v2_default target and I get the following error:
In function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()': ~/gcc-arm-none-eabi-5_4-2016q2/arm-none-eabi/include/c++/5.4.1/bits/basic_string.h:543: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()'

I was searching online and some suggested adding #define _GLIBCXX_USE_CXX11_ABI 0 before including any STL headers. But then I get this other error:
undefined reference to std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' undefined reference to std::string::_Rep::_S_empty_rep_storage'

Then I found that uORB uses std::string except for PX4_NUTTX. Is there any reason std::string cannot be used?

Thanks

Hey Gabriel, did you ever figure this out? I have run into a similar issue.

It’s been a while, but I think I worked around the issue by not using std::string.