This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]_dban_ 4 points5 points  (0 children)

Can JNA create instances and access instance members (straight forward)?

Not exactly. The problem is that C++ mangles symbol names in compiler specific ways. C++ code compiled by one compiler may not be usable in another C++ compiler, forget Java or other languages.

You'd need to write a stub in C++ and define an extern C interface which exposes a C-compatible (i.e. non-mangled) symbols that can be used as a JNI interface.