Problem building Proton-c's java bindings on Windows - Cannot open include file: 'stdbool.h

2013-02-27 Thread Keith W
I’m trying to build Proton-C’s Java Bindings on Windows using
Microsoft Visual Studio 2010 in order to verify the changes for
PROTON-249.

I’m following the instructions in the README successfully but I am
failing to build target proton-jni (proton target is building okay).
It is failing whilst trying to compile the Swig generated C code with
the following error.


5-- Build started: Project: proton-swig, Configuration: Debug Win32 --
5Build started 27/02/2013 16:30:14.
5InitializeBuildStatus:
5  Touching proton-swig.dir\Debug\proton-swig.unsuccessfulbuild.
5CustomBuild:
5  All outputs are up-to-date.
5ClCompile:
5  javaJAVA_wrap.c
5X:\src\proton\proton-c\include\proton/engine.h(27): fatal error
C1083: Cannot open include file: 'stdbool.h': No such file or
directory
5
5Build FAILED.

I suspect that the binding/java/CMakeLists.txt needs to pass compiler
flags when on Windows (via swig) in a similar way to that done in
proton-c’s CMakeLists.txt.

Can anyone give me a pointer into exactly what needs to be done?


Kind regards, Keith.


Re: Problem building Proton-c's java bindings on Windows - Cannot open include file: 'stdbool.h

2013-02-27 Thread Cliff Jansen
Visual Studio is not friendly to modern day C (a perennial complaint
that falls on deaf ears).  You must use its C++ compiler on the
proton-c code base.  In the case of swig via Visual Studio, you have
to coax it to use C++ too.

See the lines

  if (BUILD_WITH_CXX)
 SET_SOURCE_FILES_PROPERTIES(python.i PROPERTIES CPLUSPLUS ON)
  endif (BUILD_WITH_CXX)

in proton-c/bindings/python/CMakeLists.txt.  Hopefully a similarly
constructed directive will get swig compile working.

Cliff

On Wed, Feb 27, 2013 at 8:42 AM, Keith W keith.w...@gmail.com wrote:
 I’m trying to build Proton-C’s Java Bindings on Windows using
 Microsoft Visual Studio 2010 in order to verify the changes for
 PROTON-249.

 I’m following the instructions in the README successfully but I am
 failing to build target proton-jni (proton target is building okay).
 It is failing whilst trying to compile the Swig generated C code with
 the following error.


 5-- Build started: Project: proton-swig, Configuration: Debug Win32 
 --
 5Build started 27/02/2013 16:30:14.
 5InitializeBuildStatus:
 5  Touching proton-swig.dir\Debug\proton-swig.unsuccessfulbuild.
 5CustomBuild:
 5  All outputs are up-to-date.
 5ClCompile:
 5  javaJAVA_wrap.c
 5X:\src\proton\proton-c\include\proton/engine.h(27): fatal error
 C1083: Cannot open include file: 'stdbool.h': No such file or
 directory
 5
 5Build FAILED.

 I suspect that the binding/java/CMakeLists.txt needs to pass compiler
 flags when on Windows (via swig) in a similar way to that done in
 proton-c’s CMakeLists.txt.

 Can anyone give me a pointer into exactly what needs to be done?


 Kind regards, Keith.