Matlab Compiler - Runtime error in Qt Creator while initializing the MATLAB Runtime: shared object not open

9 visualizzazioni (ultimi 30 giorni)
I'm trying to include a Matlab program into Qt Creator on Ubuntu by using the Matlab Compiler. Therefore, I use a simple test program. In terminal everything works fine when I export LD_LIBRARY_PATH like this:
export LD_LIBRARY_PATH=/home/robin/Matlab_Runtime/v93/runtime/glnxa64:/home/robin/Matlab_Runtime/v93/bin/glnxa64:/home/robin/Matlab_Runtime/v93/sys/os/glnxa64:
and then run the program. Building the project in Qt Creator works fine, too, but on runtime I'm getting:
An Error has occurred while trying to initialize the MATLAB Runtime.
The error is: Fatal error loading library /home/robin/Matlab_Runtime/v93/bin/glnxa64/libmat.so Error: /home/robin/Matlab_Runtime/v93/bin/glnxa64/libmat.so: shared object not open
An Error has occurred while trying to initialize the MATLAB Runtime.
The error is: Fatal error loading library /home/robin/Matlab_Runtime/v93/bin/glnxa64/libmwmclbase.so Error: /home/robin/Matlab_Runtime/v93/bin/glnxa64/libmwmclbase.so: shared object not open
could not initialize the application properly
My LD_LIBRARY_PATH is:
/home/robin/Qt/5.9.1/gcc_64/lib:/home/robin/projects_opencv/Matlab_compiler_test/../../Matlab_Runtime/v93/runtime/glnxa64/:/home/robin/Matlab_Runtime/v93/runtime/glnxa64:/home/robin/Matlab_Runtime/v93/bin/glnxa64:/home/robin/Matlab_Runtime/v93/sys/os/glnxa64:/home/robin/Matlab_Runtime/v93/sys/opengl/lib/glnxa64:/home/robin/Matlab_Runtime/v93/extern/include
Relevant lines in my .pro file:
INCLUDEPATH += /home/robin/Matlab_Runtime/v93/extern/include
LIBS += -L$$PWD/../../Matlab_Runtime/v93/runtime/glnxa64/ -lmwmclmcrrt
INCLUDEPATH += $$PWD/../../Matlab_Runtime/v93/runtime/glnxa64
DEPENDPATH += $$PWD/../../Matlab_Runtime/v93/runtime/glnxa64
LIBS += -L$$PWD/../../Matlab_Runtime/v93/bin/glnxa64/ -lmat -lmwmclbase
INCLUDEPATH += $$PWD/../../Matlab_Runtime/v93/bin/glnxa64
DEPENDPATH += $$PWD/../../Matlab_Runtime/v93/bin/glnxa64
I'm grateful for any kind of help on this. Thank you very much!

Risposte (1)

simin Li
simin Li il 19 Gen 2019
Modificato: simin Li il 21 Gen 2019
I have no problem with QT4.8.

Community Treasure Hunt

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

Start Hunting!

Translated by