error of compilation with mex (environement wsl -> ubuntu -> matlab 2024)

조회 수: 9 (최근 30일)
Remi Choquet
Remi Choquet 2024년 5월 24일
댓글: Animesh 2024년 7월 31일
Hello,
I tried to execute this simple compilation
> mex yprime.c
and I got this error
> Building with 'gcc'.
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status
Can you help me,

답변 (1개)

Animesh
Animesh 2024년 5월 24일
The following MATLAB Answer might be of help:
  댓글 수: 3
Han
Han 2024년 7월 18일
I got exactly the same problem, could someone help with this?
Animesh
Animesh 2024년 7월 31일
It seems that the operating system's version of "libstdc++" and the version being used by MATLAB are different. Here is something you could try: when starting MATLAB, use the following command in the Bash shell:
LD_PRELOAD=matlabroot/bin/glnxa64/glibc-2.17_shim.so application
Here, "matlabroot" is the MATLAB installation path, and "application" is the original command that generated the error message.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by