MathLink: C++ Programs on SunSolaris
- To: mathgroup@smc.vnet.net
- Subject: [mg12421] MathLink: C++ Programs on SunSolaris
- From: Beat Zahnd <zahnb@student.isbiel.ch>
- Date: Thu, 14 May 1998 11:15:30 -0400
- Organization: Engineering School Biel
- References: <6j3irc$clc@smc.vnet.net>
My programm is an interface between Java and Mathematica I have created a shared library (*.so). After executing the Java application the following error ocours: eclab17.zahnb[29] new/classes > java JMathLinkTest ld.so.1: /opt/pub/java/bin/../bin/sparc/green_threads/java: fatal: relocation error: symbol not found: MLClearError__FP5MLink: referenced in ./libMathLink4Java.so (libMathLink4Java.so) java.lang.UnsatisfiedLinkError: no MathLink4Java in shared library path at java.lang.Runtime.loadLibrary(Runtime.java) at java.lang.System.loadLibrary(System.java) at packages.mathematica.JMathLink.<init>(JMathLink.java:68) at JMathLinkTest.main(JMathLinkTest.java:28) This is my makefile: PROJECT_HOME = /home/students/m97b/zahnb/java/packages/mathematica/new CC = gcc JDK_HOME = /opt/pub/java JAVAC = ${JDK_HOME}/bin/javac JAVAH = ${JDK_HOME}/bin/javah JDK_CLASSPATH = ${JDK_HOME}/lib/classes.zip PACKAGE_CLASSPATH = ${PROJECT_HOME}/classes # Create Shared Lib C File libMathLink4Java.so: packages_mathematica_JMathLink.o ${CC} -G packages_mathematica_JMathLink.o -lML -L./ -o $@ -lm -lsocket -lnsl # Compile C File packages_mathematica_JMathLink.o: packages_mathematica_JMathLink.h packages_mathematica_JMathLink.C ${CC} -c -I${JDK_HOME}/include -I${JDK_HOME}/include/solaris packages_mathematica_JMathLink.C # Generate C Header Files #packages_mathematica_JMathLink.h: classes/packages/mathematica/JMathLink.class # @echo "GENERATING C HEADER FROM JAVA CLASS" # ${JAVAH} -jni -classpath ${PACKAGE_CLASSPATH}:${JDK_CLASSPATH} $@ Beat Zahnd Engineering School Biel Switzerland