Matlab Compiler - Runtime error in Qt Creator while initializing the MATLAB Runtime: shared object not open
이전 댓글 표시
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!
댓글 수: 2
Robin Szymanski
2018년 1월 24일
Hazik Ahmad
2018년 4월 26일
Hi Robin, did you have any luck with this?
답변 (1개)
I have no problem with QT4.8.
카테고리
도움말 센터 및 File Exchange에서 Plot Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!