From: William S F. <ws...@fu...> - 2011-10-13 06:15:26
|
On 12/10/11 10:05, Цветко ЛАГАЈОВИЋ wrote: > Hi, > > I am currently using SWIG under cygwin/MacOS in an android project. I > use SWIG to wrap my C++ classes in java. > > Lately, I've been adding callback/listeners classes. At this occasion, > I've discovered the existence of directors feature. > > It's very nice, but I have three issues with it, it's the use of > dynamic_cast (no rtti under Android), the use of > AttachCurrentThread/DetachCurrentThread which would detach a thread that > was not attached by SWIG directors and a small issue with non-standard > jni headers (signature of AttachCurrentThread). > > I managed to patch Swig's "java/director.swg" file in > "/usr/share/swig/..." What I would like to know is how can I instruct > Swig to use the "director.swg" file from my source tree instead of the > default one from "/usr/share/swig" so I don't have to patch swig > installed files on each developer's computer. > > Thanks for any help, Please post a patch with the changes that you have in place and I'll look at putting these in to the official version of SWIG with some suitable macro to enable. Is there a macro indicating an Android JDK rather than a normal JDK that could be used? Use swig -v to display the paths that it looks for files in. The ./swig_lib/java directory is probably the best place to put in your own version of director.swg. William |