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

  endif (BUILD_WITH_CXX)

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


On Wed, Feb 27, 2013 at 8:42 AM, Keith W <> 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 
> ------
> 5>Build started 27/02/2013 16:30:14.
> 5>InitializeBuildStatus:
> 5>  Touching "proton-swig.dir\Debug\proton-swig.unsuccessfulbuild".
> 5>CustomBuild:
> 5>  All outputs are up-to-date.
> 5>ClCompile:
> 5>  javaJAVA_wrap.c
> 5>X:\src\proton\proton-c\include\proton/engine.h(27): fatal error
> C1083: Cannot open include file: 'stdbool.h': No such file or
> directory
> 5>
> 5>Build 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.

Reply via email to