Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WG: Compiling JNI Libs on 10.5 (for 10.4)



Oh, sorry, I forgot to forward the message to the list. :)

Cheers,
Werner

------original message-----
Von: email@hidden
Datum: 09.11.2007 12:55
An: <email@hidden>
Betreff: AW: Compiling JNI Libs on 10.5 (for 10.4)

Hi Stefan,

You have to set the environment variable MACOSX_DEPLOYMENT_TARGET 
to 10.4 before building your code.

For details see:             http://developer.apple.

com/documentation/DeveloperTools/Conceptual/cross_development/Using/chapter_3_section_2.
html#//apple_ref/doc/uid/20002000-1114311-BABGCAAB

With best regards,
Werner

----Ursprüngliche Nachricht----
Von: email@hidden
Datum: 09.11.2007 12:06
An: <email@hidden>
Betreff: Compiling JNI Libs on 10.5 (for 10.4)

What is the trick to compile a JNI lib on 10.5 that should also 
work on 10.4?

Right now I'm using:

g++
  -c
  -g
  -pipe
  -O2
  -Wall
  -W
  -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386
  -I/System/Library/Frameworks/JavaVM.framework/Headers
  my_lib_MyClass.cpp

g++
  -o MyLib.so
  my_lib_MyClass.o
  -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
  -arch i386
  -dynamiclib
  -framework JavaVM

But that results in a:

ld: library not found for -ldylib1.10.5.o
collect2: ld returned 1 exit status
ld: library not found for -ldylib1.10.5.o
collect2: ld returned 1 exit status
lipo: can't open input file:
/var/folders/5i/5inkXg8OGZWPGkqRVOdWdE+++TI/-Tmp-//ccmCrWXP.out 
(No
such file or directory)

This build works ok in 10.4.

 S.



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.