From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10956 invoked by alias); 21 May 2009 08:41:40 -0000 Received: (qmail 10945 invoked by uid 22791); 21 May 2009 08:41:40 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=BAYES_00,J_CHICKENPOX_54,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from qw-out-1920.google.com (HELO qw-out-1920.google.com) (74.125.92.146) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 May 2009 08:41:33 +0000 Received: by qw-out-1920.google.com with SMTP id 4so649953qwk.14 for ; Thu, 21 May 2009 01:41:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.46.15 with SMTP id h15mr2399000vcf.107.1242895290584; Thu, 21 May 2009 01:41:30 -0700 (PDT) Date: Thu, 21 May 2009 08:41:00 -0000 Message-ID: <6f1633170905210141u3861d1ffh112de85009d88271@mail.gmail.com> Subject: gcj: issue with run time library loading From: Vaijayanthi Mala Suresh To: java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2009-05/txt/msg00052.txt.bz2 Hi, I am trying to use JNI calls using gcj. Hello.java is the jave code having a native method. gcj -c -fjni Hello.java -o MyApp.o gcjh Hello -o MyApp.h ar -rcs libHello.a MyApp.o Hello.c contains the native code implementation gcjh -jni Hello g++ -c Hello.c ar rcs libNative.a Hello.o I have a test.cpp where I have initialized the JVM and I am trying to invoke a method in the Java code which inturn invokes the native method. I have linked the above libraries along with test.o I am getting the following error Unhandled Java exception: java.lang.UnsatisfiedLinkError: natPrint <> Can anyone help me to resolve this problem. Thanks Mala