Re: C++ to java bridge
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
---910079544-1874234784-1211819352=:10288
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT
On Mon, 26 May 2008, dao wrote:
On 26 mai, 05:18, Arne Vajh?j <a...@vajhoej.dk> wrote:
dao wrote:
Unfortunately, I am not using a com object (either dll or sl/so
libraries in unix)
An the different solution I want an evaluation are compilers that
generates java code implementing JNI.
JNI is very complicated to use. I want an automatic bridge compiler
between C++ and java
What do the exactly expect ?
A program that can take a .h file and generate:
- .java with class and native methods
- JNI .h
- JNI .c with delegation to the real functions
?
Arne
I want a solution that creates a jar (or .java) from:
* .h
* .so, .sl or .dll
I suppose I am not the first to have those requirements...
http://www.swig.org/
It's not quite .h-to-.java - you have to write a simple interface file,
but that's pretty much trivial, and if your C code isn't complicated,
boils down to five lines for any amount of C.
Also, there are limits on what you can do. If the code on the C side
stashes a pointer you pass it between invocations, i think you're in
trouble. Real JNI is the only way to deal with this.
tom
--
And dear lord, its like peaches in a lacy napkin. -- James Dearden
---910079544-1874234784-1211819352=:10288--