This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: CNI problem on MS Windows (GCC 3.4)
- From: "Amir Bukhari" <ufz6 at rz dot uni-karlsruhe dot de>
- To: <java at gcc dot gnu dot org>
- Date: Sat, 21 May 2005 16:21:56 +0200
- Subject: RE: CNI problem on MS Windows (GCC 3.4)
> -----Original Message-----
> From: tromey@redhat.com [mailto:tromey@redhat.com]
> Sent: Saturday, May 21, 2005 2:26 AM
> To: Amir Bukhari
> Cc: java@gcc.gnu.org
> Subject: Re: CNI problem on MS Windows (GCC 3.4)
>
> >>>>> "Amir" == Amir Bukhari <ufz6@rz.uni-karlsruhe.de> writes:
>
> Amir> I am try to learn CNI. I have just tried a very simple example:
> Amir> I compiled it like c++ test.cc -lgcj
> Amir> but I got a number of undefined reference like
>
> Offhand I don't know what went wrong for you.
> How small is your example? Perhaps you could post it.
>
It is realy very simple:
#include <gcj/cni.h>
#include <java/lang/System.h>
int main(int argc, char *argv)
{
using namespace java::lang;
JvCreateJavaVM(NULL);
JvAttachCurrentThread(NULL, NULL);
String *message = JvNewStringLatin1("Hello from C++");
JvDetachCurrentThread();
}