Details
Description
Swig generated C code for the Java bindings fails to compile on Visual Studio 2010 with error message:
C1083: Cannot open include file: 'stdbool.h': No such file or directory
After discussion on list [1], we tried changing bindings/java/CMakeLists.txt to use CPLUSPLUS ON directive to CMake in the case where BUILD_WITH_CXX has been enabled earlier in the build.
if (BUILD_WITH_CXX)
SET_SOURCE_FILES_PROPERTIES(java.i PROPERTIES CPLUSPLUS ON)
endif (BUILD_WITH_CXX)
Switching to CPP in this way exposed a number of errors when compiling the CPP code resulting from the java.i (casting issues, pointer arithmetic etc - see attached make-proton-jni-cxx-errors.txt). However, even after resolving the CPP compilation issues, we then encounter a problem with Swig's handling of nested unions when when CPP. The seeming inability of SWIG (when used with CPP) to represent the union means that SWIG does not produce pn_atom_t_u.java. JNIMessage.java, which references pn_atom_t_u, consequently fails to compile.
The warning from swig is:
/home/keith/src/proton/proton-c/include/proton/codec.h:91: Warning 312: Nested union not currently supported (ignored).
Attachments
Attachments
Issue Links
- relates to
-
PROTON-249 Build fails on Win8 / VS 2012 with path error
- Closed