[398] in java-interest
Re: Java and C++
daemon@ATHENA.MIT.EDU (Chuck McManis)
Mon Jun 19 20:38:23 1995
Date: Mon, 19 Jun 1995 17:10:16 -0700
From: cmcmanis@scndprsn.Eng.Sun.COM (Chuck McManis)
To: java-interest@java.Eng.Sun.COM, weilerj@std.teradyne.com
Cc: sandersd@std.teradyne.com, craigr@std.teradyne.com
From the error, we gathered that java couldn't find the C++
library on it's own, so we tried explicitly linking libC.so
from the java code both before and after we link libaddwave.so.
Two questions,
What is the link line for libaddwave.so?
What do you see when you type 'ldd libaddwave.so' ?
(hint: it should say libC.so => <$LOC> where $LOC == libC.so location)
> Is there a resaon that java can't call C++ code directly?
There is no reason that Java native methods, written in C, couldn't call C++
directly (as long as there is a C stub available). It should be no different
than calling C++ from straight C.
>I've heard that it may be because C++ is mutilating the function names in the
>library to deal with overloading and such, is there a way I can get at the exact
>function names as they appear in the library?
/usr/ccs/bin/nm /usr/lib/libC.so.5
on my machine it shows cout as a global.
--Chuck
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com