On 1 March 2013 16:15, Cliff Jansen <[email protected]> wrote:
> I did all that and verified the c++ swig call was used and g++ on
> javaJAVA_wrap.cxx.  I also needed the fix in PROTON-249 to progress on
> Windows.
>
> Let me know if you have made further progress.  Otherwise, I will keep 
> digging.
>
> Cliff

Hi Cliff

I made a commit under PROTON-254 that

a) changes bindings/java/CMakeLists.txt to use CPLUSPLUS ON directive
in the case where BUILD_WITH_CXX has been enabled
b) resolves the compilation errors that resulted from compiling the
swig generated C++ code.

That leaves the problem with "Nested union not currently supported'
reported by Swig.  You'll remember that Swig doesn't support nested
types when operating in C++ mode, and so ignores the nested union
within pn_atom_t.  This means swig fails to generate the pn_atom_t_u
java class and so our hand-rolled java binding code (java) fails to
compile.

I've attached a patch to PROTON-254 that works around the issue by
simply moving the union to the top level.  This seems to avoid the
swig limitation seemingly without breaking anything else.  Do you see
a problem with this approach?  Can you think of an neater alternative?

The patch allows the JNI tests to pass under C++ on Ubuntu and MacOSX.
 I'm yet to try on Windows.

Kind regards, Keith.

Reply via email to