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

17 visualizaciones (últimos 30 días)
Remi Choquet
Remi Choquet el 24 de Mayo de 2024
Comentada: Animesh el 31 de Jul. de 2024
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,

Respuestas (1)

Animesh
Animesh el 24 de Mayo de 2024
The following MATLAB Answer might be of help:
  3 comentarios
Han
Han el 18 de Jul. de 2024
I got exactly the same problem, could someone help with this?
Animesh
Animesh el 31 de Jul. de 2024
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.

Iniciar sesión para comentar.

Categorías

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

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by