compiling JNI library for PPC and Intel hardware?
compiling JNI library for PPC and Intel hardware?
- Subject: compiling JNI library for PPC and Intel hardware?
- From: Rob Ross <email@hidden>
- Date: Tue, 7 Nov 2006 10:53:50 -0800
I've read technote 1295 (http://developer.apple.com/qa/qa2005/
qa1295.html) and http://developer.apple.com/java/jniuniversal.html
(building a JNI Universal application), but I'm still having trouble
creating a jni library that works on both PPC and Intel hardware.
I don't actually have an intel machine, so that makes debugging more
difficult for me. But I have created a jni library in the JDIC
project which implements the TrayIcon API for Mac OS, and it works
great on my G4 machine.
However, it gives an UnsatisfiedLinkError when run on an Intel box.
My jni library is composed of 6 source files, and I am compiling them
via a shell script that is invoked via an ant task. The contents of
the shell script are simply:
gcc -std=gnu99 -c -arch i386 -arch ppc -isysroot /Developer/SDKs/
MacOSX10.4u.sdk -I/System/Library/Frameworks/JavaVM.framework/Headers
-I/System/Library/Frameworks/Cocoa.framework/Headers *.m
gcc -dynamiclib -o ../libtray.jnilib *.o -framework JavaVM -
framework Cocoa
Am I missing something?
Thanks,
Rob Ross, Lead Software Engineer
E! Networks
---------------------------------------------------
"Beware of he who would deny you access to information, for in his
heart he dreams himself your master." -- Commissioner Pravin Lal
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden