Missing symbol in mex .mexa in Simulink

2 visualizaciones (últimos 30 días)
Álvaro Salcedo
Álvaro Salcedo el 23 de Nov. de 2017
Comentada: Álvaro Salcedo el 23 de Nov. de 2017
Hi to all.
I have created a .mexa with mex function. It compiles well. Now I want to use this .mexa in simulink (with S-function).
But when I run simulink it gives me these errors:
Missing symbol '_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc' required by 'positionXY.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_' required by 'positionXY.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_' required by 'positionXY.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev' required by 'positionXY.mexa64'.
How can I solve this? I am working with matlab 2017a. In previous version of Matlab this .mexa works...
Thanks a lot.
  2 comentarios
Walter Roberson
Walter Roberson el 23 de Nov. de 2017
Missing symbol 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const' required by 'positionXY.mexa64'
Missing symbol 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)' required by 'positionXY.mexa64'
Missing symbol 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' required by 'positionXY.mexa64'
Missing symbol 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' required by 'positionXY.mexa64'.
Those appear to be routines I would expect to see in the standard C++ library, libC++
Álvaro Salcedo
Álvaro Salcedo el 23 de Nov. de 2017
I have fixed!!!
Just add this in bashrc:
export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libprotobuf.so.9
And then do this in terminal
source ./bashrc

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by