DLL link error with MCRInstaller
Show older comments
So I am trying to use Builder JA with the MagicSquare example. I can create the appropriate jar and run it on one (linux) based machine with matlab installed.
However, I am attempting to run it on a second (linux) machine according to the example. I have transferred the driver code and the magicsquare.jar and have installed mcr and set LD_LIBRARY_PATH, but it seems that the code is looking in the address on the original machine.
What am I missing?
// I think my configuration is setup OK
echo $LD_LIBRARY_PATH /opt/MATLAB/MATLAB_Compiler_Runtime/v713/runtime/glnxa64:/opt/MATLAB/MATLAB_Compiler_Runtime/v713/sys/os/glnxa64:/opt/MATLAB/MATLAB_Compiler_Runtime/v713/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/opt/MATLAB/MATLAB_Compiler_Runtime/v713/sys/java/jre/glnxa64/jre/lib/amd/server:/opt/MATLAB/MATLAB_Compiler_Runtime/v713/sys/java/jre/glnxa64/jre/lib/amd64
echo $APPLRESDIR /opt/MATLAB/MATLAB_Compiler_Runtime/v713/X11/app-defaults
java -version java version "1.6.0_31" Java™ SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot™ 64-bit Server VM (build 20.6-b01, mixed mode)
// so here it seems to ignore those settings and call the address on the original box
java -cp magicsquare.jar:MagicDemoJavaApp:/opt/MATLAB/MATLAB_Compiler_Runtime/v713/toolbox/javabuilder/jar/javabuilder.jar getmagic 4 Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/local/MATLAB/runtime/glnxa64/libmwmclmcrrt.so.7.13 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1706) at java.lang.Runtime.load0(Runtime.java:1003) at java.lang.System.load(System.java:1003) at getmagic.main(getmagic.java:20)
// or with java.library.path set...
java -Djava.library.path=/opt/MATLAB/MATLAB_Compiler_Runtime/v713/runtime/glnxa64/ -cp magicsquare.jar:/opt/MATLAB/MATLAB_Compiler_Runtime/v713/toolbox/javabuilder/jar/javabuilder.jar:MagicDemoJavaApp/ getmagic 4 Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/local/MATLAB/runtime/glnxa64/libmwmclmcrrt.so.7.13 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1706) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1003) at getmagic.main(getmagic.java:20)
// the library is on the path
find /opt/MATLAB/MATLAB_Compiler_Runtime -name 'libmwmclmcrrt.so.7.13' /opt/MATLAB/MATLAB_Compiler_Runtime/v713/runtime/glnxa64/libmwmclmcrrt.so.7.13
Answers (0)
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!