This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
unsatisfied link error
- From: Mark Polo <sanal dot kumaran at nucleussoftware dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 21 Nov 2007 23:22:06 -0800 (PST)
- Subject: unsatisfied link error
hi im newbie to Linux platform .
i just want to convert my jni application to linux .
its workikikg n fine in windows XP.
But unsatisfiedlinkerror thrown by JVm in Linux .
Im sendin gu all the code plz analyze it ..
-------------------
package demo;
public class Sample6 {
public native int CardVerifyTxn(String custname,int c_no,int cardno,int
d_id ,String txn_type,int txn_amt,String card_validity_date);
public int VerifyTxn(String custname,int c_no,int cardno,int d_id,String
txn_type,int txn_amt,String card_validity_date)
{
System.out.println("In CardVerifyTxn");
System.loadLibrary("TxnDetail2");
System.loadLibrary("TxnDetail3");
Sample6 sample = new Sample6();
int status =
sample.CardVerifyTxn(custname,c_no,cardno,d_id,txn_type,txn_amt,card_validity_date);
return status;
}
}
-------------------------------------
i made the header file
c application is
------------------------
#include "demo_Sample3.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
# include <time.h>
#include <jni.h>
JNIEXPORT jint JNICALL Java_Sample2_cardTxnVerify(JNIEnv *env, jobject
obj,jstring cust_name,jint c_no,jint cardno,jint d_id,jstring xntype,jint
txn_amt,jstring cardvaliditydate)
{ //cardTxnVerify
return c_no;
}
void main(){}
--------------------------
gcc Sample2.c -o lib/libTxnDetail3.so -shared
-I/usr/java/j2sdk1.5.0_13/include -I/usr/java/j2sdk1.5.0_13/include/linux
--------------------------
I have my client in windows WAS and webservice (a java class using JNi to
call .so file in Linux)
in linux WAS
anybody plz analyze and reply ..
thnks for ur time
sanal
--
View this message in context: http://www.nabble.com/unsatisfied-link-error-tf4854794.html#a13892030
Sent from the gcc - Dev mailing list archive at Nabble.com.