|
From: Ranjit M. <rma...@ho...> - 2003-02-27 12:20:13
|
> I have spent several days trying to understand what it is I am doing wrong > and I have realised I need help! > > I am trying to compile a simple java class doing nothing more than return a > string to a DLL I can use in VC++. The java class looks like this: This is not the way to do it! You will have to use JNI to be able to communicate between Java and C++ for maximum interoperability. The binary class format of GCJ is tightly integrated with the GCC C++ class format, which is not known to VC++ - what you are trying to do is possible in GCC/GCJ using CNI (Compiled Native Interface). In general, even "normal" C++ DLLs created with GCC will not work with VC++ (except, of course, for extern "C" methods), simply because the formats they use are completely different. Hope this helps. Ranjit. |