Hi Martin,

right ! I compiled with success, I didn't see the PCSC framework missing... thanks a lot !

I obtained the .jnilib file and I now go creating a "Java to smartcard" application.

I will keep you informed on what's going on...

Dan.
:-)



Il giorno 28/dic/05, alle ore 12:52, Martin Paljak ha scritto:

This is very simple - you just have to link againsT PCSC framework!


On 28.12.2005, at 13:37, Daniele D'Antoni wrote:

OK,

command : cc -c -I/System/Library/Frameworks/JavaVM.framework/ Headers jpcsc.c

command results :
jpcsc.c: In function 'Java_com_linuxnet_jpcsc_Context_NativeGetStatusChange': jpcsc.c:610: warning: pointer targets in assignment differ in signedness jpcsc.c:623: warning: pointer targets in passing argument 3 of '(*env)->ReleaseByteArrayElements' differ in signedness jpcsc.c:646: warning: pointer targets in passing argument 5 of '(*env)->SetByteArrayRegion' differ in signedness
jpcsc.c: In function 't0_get_response':
jpcsc.c:769: warning: pointer targets in passing argument 3 of 'SCardTransmit' differ in signedness jpcsc.c:769: warning: pointer targets in passing argument 6 of 'SCardTransmit' differ in signedness jpcsc.c: In function 'Java_com_linuxnet_jpcsc_Card_NativeTransmit___3BII': jpcsc.c:801: warning: pointer targets in assignment differ in signedness jpcsc.c:810: warning: pointer targets in passing argument 3 of 'SCardTransmit' differ in signedness jpcsc.c:810: warning: pointer targets in passing argument 6 of 'SCardTransmit' differ in signedness jpcsc.c:818: warning: pointer targets in passing argument 3 of 'SCardTransmit' differ in signedness jpcsc.c:818: warning: pointer targets in passing argument 6 of 'SCardTransmit' differ in signedness jpcsc.c:826: warning: pointer targets in passing argument 3 of '(*env)->ReleaseByteArrayElements' differ in signedness jpcsc.c:834: warning: pointer targets in passing argument 5 of '(*env)->SetByteArrayRegion' differ in signedness jpcsc.c: In function 'Java_com_linuxnet_jpcsc_Card_NativeTransmit___3BII_3BI': jpcsc.c:861: warning: pointer targets in assignment differ in signedness jpcsc.c:862: warning: pointer targets in assignment differ in signedness jpcsc.c:872: warning: pointer targets in passing argument 3 of 'SCardTransmit' differ in signedness jpcsc.c:872: warning: pointer targets in passing argument 6 of 'SCardTransmit' differ in signedness jpcsc.c:880: warning: pointer targets in passing argument 3 of 'SCardTransmit' differ in signedness jpcsc.c:880: warning: pointer targets in passing argument 6 of 'SCardTransmit' differ in signedness jpcsc.c:888: warning: pointer targets in passing argument 3 of '(*env)->ReleaseByteArrayElements' differ in signedness jpcsc.c:889: warning: pointer targets in passing argument 3 of '(*env)->ReleaseByteArrayElements' differ in signedness
jpcsc.c: In function 'Java_com_linuxnet_jpcsc_Card_NativeStatus':
jpcsc.c:919: warning: pointer targets in passing argument 6 of 'SCardStatus' differ in signedness jpcsc.c:931: warning: pointer targets in passing argument 5 of '(*env)->SetByteArrayRegion' differ in signedness
jpcsc.c: In function 'Java_com_linuxnet_jpcsc_Card_NativeControl':
jpcsc.c:1029: warning: pointer targets in assignment differ in signedness jpcsc.c:1042: warning: pointer targets in passing argument 2 of 'SCardControl' differ in signedness jpcsc.c:1042: warning: pointer targets in passing argument 4 of 'SCardControl' differ in signedness jpcsc.c:1047: warning: pointer targets in passing argument 3 of '(*env)->ReleaseByteArrayElements' differ in signedness jpcsc.c:1055: warning: pointer targets in passing argument 5 of '(*env)->SetByteArrayRegion' differ in signedness

and then,

command : cc -dynamiclib -o libjpcsc.jnilib jpcsc.o -framework JavaVM

command results :
ld: Undefined symbols:
_SCardBeginTransaction
_SCardCancel
_SCardConnect
_SCardControl
_SCardDisconnect
_SCardEndTransaction
_SCardEstablishContext
_SCardGetStatusChange
_SCardListReaderGroups
_SCardListReaders
_SCardReconnect
_SCardReleaseContext
_SCardStatus
_SCardTransmit
_pcsc_stringify_error
/usr/bin/libtool: internal link edit command failed

Note that commands to make a JNI library are coming from Apple's Java14Development.pdf .

I think I have problems with method headers. So today I am going to generate them again. Since I am compiling the package manually, I think there're some unresolved symbols into the code.

About XCode (version 2.0), you can develop a JNI application. There's a Wizard for you. It creates a default libjpcsc.c file, a default JNIWraper.java file, and goes generating a JNIWrapper.jar archive, a JNIWrapper.h header file and libjpcsc.jnilib file. I changed default file names coming from Wizard to adapt the environment to my needs but when I go compiling XCode still looks for old file names and I didn't find the place where to really change them.

Anyway, I am trying to convert the original package coming from Muscle into one for XCode developers (or at least, for Mac developers).

Of course, if you have checked out the error messages I wrote you before and you have an idea about how to solve the problem, let me know as well.

Thank you.
Daniele.
:-)
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

--
Martin Paljak
[EMAIL PROTECTED]



_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to