From: Andrew Hefford <coregen@ho...> - 2007-10-28 19:34:00
I managed to find a pre-existing post on my problem but sadly no solution so
to bump the important parts of his post:
"I have a large C++ App which starts a JVM via the JNI Invocation interface.
I then need to call back into the C++ app from the Java. However, as the C++
is an app not a dll, I can't use "LoadLibrary" so am planning to use the
"RegisterNatives" method (from the JNIEnv) to register all the Native
methods created by SWIG from the C++ side so that the Java can find them.
The problem is that to do this I need to create all those nasty signatures (
"()V" etc ) for the methods created by SWIG."
Is it possible to do this without re-writing SWIG?
Is it possible perhaps to follow each native method with some static
variable defined in such a way as to register information about the method
(as described above) with some singleton?
Or perhaps there is some cleaner method of access the parse tree in the
final stages of writing out the *_wrap.cpp file?
Free update to Windows Live Hotmail http://www.newhotmail.co.uk
Get latest updates about Open Source Projects, Conferences and News.