[5637] in java-interest
Re: C++ - how to link
daemon@ATHENA.MIT.EDU (Dae Song Park - the jibe master)
Tue Feb 20 20:36:12 1996
Date: Tue, 20 Feb 1996 18:33:37 -0500
From: Dae Song Park - the jibe master <dpark@F1.telekurs.ch>
To: java-interest@java.sun.com
Dae Song Park - the jibe master wrote:
>
> Has anyone successfully linked C++ objects to Java? I haven't been
> able link due to relocation errors. I'm simply wrapping C++ objects
> with C functions with no success whatsoever. Any help will greatly
> be appreciated.
>
> The following is the error messages generated by the linker: (Note
> that it links fine if cout is commented out.)
>
> ld.so.1: /usr/local/java/bin/../bin/sparc/java: fatal: relocation
> error: symbol not found: cout: referenced in .//libhello.so
> (.//libhello.so)
> java.lang.UnsatisfiedLinkError: no hello in shared library path
> at java.lang.Runtime.loadLibrary(Runtime.java)
> at java.lang.System.loadLibrary(System.java)
> at HelloWorld.<clinit>(HelloWorld.java:7)
> at Main.main(Main.java:6)
> java.lang.UnsatisfiedLinkError: printHelloWorld
> at Main.main(Main.java:12)
>
> Thanks,
I have resolved the problem. Instead of using CC to link, I've tried
ld and the problem mysteriously went away.
Dae Song
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com