public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* unsatisfied link error
@ 2007-11-22 15:38 Mark Polo
  2007-11-22 16:46 ` David Daney
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Polo @ 2007-11-22 15:38 UTC (permalink / raw)
  To: gcc


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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: unsatisfied link error
  2007-11-22 15:38 unsatisfied link error Mark Polo
@ 2007-11-22 16:46 ` David Daney
  0 siblings, 0 replies; 2+ messages in thread
From: David Daney @ 2007-11-22 16:46 UTC (permalink / raw)
  To: Mark Polo; +Cc: gcc

Mark Polo wrote:
> hi im newbie to Linux platform .
>   
This mailing list is for those who write and maintain gcc, not for those
asking questions about how to *use* it.

Please ask either on gcc-help@gcc.gnu.org or perhaps in a forum for java
related questions.

Also indicating the actual error you are experiencing might be useful.

Thanks,
David Daney

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-22  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-22 15:38 unsatisfied link error Mark Polo
2007-11-22 16:46 ` David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).