Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

native code and System.loadLibrary()

0 views
Skip to first unread message

Per WERNER

unread,
Jun 10, 1999, 3:00:00 AM6/10/99
to
Hello,
I have a problem with System.loadLibrary() when calling a C++ via the
Java method
'String MonHisto.resourceString2PrintString(String)'.
I get undefined symbol 'before__6Thread' though it is defined in
libos.so, see below.
Adding System.loadLibrary("os") both before and after loading the
other two libraies does not help. I've tried on both sun4u-SunOS
and i686-Linux and the results were the same.
As 'before__6Thread' is not really used I removed all references to
the Thread class in the status lib but then I got other undefined
symbols.

The lib dependencies are that libmonitor.so uses libstatus.so
that uses libos.so.

Maybe someone has encountered and solved a problem like this one.

Hope someone can help,
Thanks in advance,
Per E. Werner
**********************************************************************
* Mail address : Per.W...@cern.ch *
* Telephone : ++41-22-767.49.32, Fax: 767.84.20 *
* Organization : CERN - European Laboratory for Particle Physics *
* EP Division - ATLAS Trigger&DAQ Group, ATD *
* 1211 Geneva 23, Switzerland *
**********************************************************************
------------ Output from Linux ------------

pcatd35_~/work/t2ref/src/monitor_287>nm
/home/werner/work/t2ref/i686-Linux/lib/libos.so | grep before__6Thread
0000d428 T before__6Thread
pcatd35_~/work/t2ref/src/monitor_288>make run
javac -depend -deprecation -O -d /home/werner/work/t2ref/JavaClasses
MonHisto.java
java monitor.Monitor

/home/werner/work/t2ref/i686-Linux/lib/libstatus.so: undefined symbol:
before__6Thread (libstatus.so)
java.lang.UnsatisfiedLinkError: no status in shared library path
at java.lang.Runtime.loadLibrary(Runtime.java)
at java.lang.System.loadLibrary(System.java)
at
at monitor.ReceiveThread.handleHistogram(ReceiveThread.java)
at monitor.ReceiveThread.receive(ReceiveThread.java)
at monitor.ReceiveThread.run(ReceiveThread.java)
pcatd35_~/work/t2ref/src/monitor_289>
------------ Java 'native' class ------------
public class MonHisto
{ public native static String resourceString2PrintString(String
monHistoResourceString);
static {
System.loadLibrary("monitor");
System.loadLibrary("status");
System.loadLibrary("os");
}
}

vcard.vcf
0 new messages