cannot dynamically load executable
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to get gcc 4.6 working with Matlab R2008b. I know that the newer version of gcc hasn't been tested but lets say I have no other way out.
The problem that I have right now is that my file; though complies without error; shows the following error during runtime:
??? Invalid MEX-file '/home/mehdi1/Desktop/test.mexglx': /home/mehdi1/Desktop/test.mexglx: cannot dynamically load executable.
Hint: I used to get the following error when trying to run my program complied directly from gcc
./test: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory
The solution was specifying the path to libgfortran in LD_LIBRARY_PATH. I am not sure how to do that with Matlab
0 comentarios
Respuestas (2)
Kaustubha Govind
el 9 de Jun. de 2011
First, I would recommend using the nm or ldd utilities to figure out all the library dependencies that are not being resolved (is this what you mean by trying to open the file in gcc?).
Once you have added the library paths to LD_LIBRARY_PATH, this should also be visible from MATLAB (you need to restart MATLAB after changing the environment variable so the new value is picked up). Try executing the following at the MATLAB prompt to see if LD_LIBRARY_PATH still has the path to libgfortran.so:
>> !printenv LD_LIBRARY_PATH
1 comentario
Walter Roberson
el 9 de Jun. de 2011
I think the problem is that Syed does not know how to change the LD_LIBRARY_PATH
Seyd is using Linux, it appears to me.
Syed Bilal Mehdi
el 9 de Jun. de 2011
1 comentario
Kaustubha Govind
el 10 de Jun. de 2011
I'm not sure what the ldd error means, but have you ensured that the path to libgfortran.so.3 is visible on LD_LIBRARY_PATH from MATLAB?
>> !printenv LD_LIBRARY_PATH
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!