Missing symbol in mex .mexa in Simulink

2 Ansichten (letzte 30 Tage)
Álvaro Salcedo
Álvaro Salcedo am 23 Nov. 2017
Kommentiert: Álvaro Salcedo am 23 Nov. 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 Kommentare
Walter Roberson
Walter Roberson am 23 Nov. 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 am 23 Nov. 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by