Mailing Lists: Apple Mailing Lists

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

Re: JNI C++ code?



On 30 sep 2005, at 16.37, Sak Wathanasin wrote:

In reply to Mohsan Khan's message of the 30/09/2005 at 10:26 +0200,


I writing a JNI lib and have realized that I can only include C files and write C code.
On Sun's site it says programmers use JNI to write native C/C++ & assemble code.



Yes you can use the C++ binding if you prefer.


I can't use std namespace.
If I try to include iostream and vector, Xcode gives error, the files could not be found.
Even when I try to include an class header file.



Xocde knows where to look for the std headers; I don't see why you should have any problems with this. Can you build a simple "HelloWorld" C++ appl?



Am I missing something or if this correct.


You are missing something. There are sample JNI XCode projects on Apple's dev website and Xocde also has a template for producing "Java JNI applications" projects.


--
Sak Wathanasin
Network Analysis Limited           http://www.network-analysis.ltd.uk



Hi

Please take a look at this image:
http://www.xybernic.com/tmp/JNI.jpg

and this simple project:
http://www.xybernic.com/tmp/JNI.zip



Yours sincerely,
Mohsan Khan.
_______________________________________________________________
Programmer, Animator, Musician
www.xybernic.com
There is no place like 127.0.0.1.
If everybody would give everybody a million would everybody be millionaires?
Nothing has got to do with anything, and something has got to do with everything.


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

This email sent to email@hidden
References: 
 >JNI C++ code? (From: Mohsan Khan <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.