On Jun 3, 2011, at 1:21, Petrus Hyvönen <[email protected]> wrote:

> Hi,
> 
> I am trying to use JCC to wrap a java library (orekit.org), and have
> successfully done so on the mac platform. As I also use windows I try to do
> the same there.
> 
> JCC compiles fine on both platforms (using --compiler=mingw32 on win, using
> the python xy distribution with mingw v4.5.2).
> 
> the wrapper is successfully created on mac by
> 
> on windows I needed to add the .__main__ for jcc:
> 
> python -m jcc.__main__ --jar orekit-5.0.jar --jar commons-math-2.2.jar
> --include orekit-data.zip --shared  --python orekit --install --files
> separate --build
> 
> the build goes on for some time and fails with extract below. Does anyone
> has some experience with this failure, and where does one start to solve it,
> is it the compiler, jcc? I have also tried with a fresh install with mingw32
> but no difference.
> 
> Any help or directions appricated.
> /Petrus
> 

This is very likely to be caused by some variable name coming from your java 
sources that is defined as a macro by the header files coming from your 
compiler. To work this around add the variable name to the reserved word list 
by adding it to the jcc command line via the --reserved flag. 
To find which variable it is look at the error messages below and at the code 
they refer to. For example, Dfp.h, line 109 or Dfp.cpp, line 22. 

Andi..

> In file included from build\_orekit\org\apache\commons\math\dfp\Dfp.cpp:3:0:
> build\_orekit/org/apache/commons/math/dfp/Dfp.h:109:38: error: expected
> unqualified-id before numeric constant
> build\_orekit\org\apache\commons\math\dfp\Dfp.cpp:22:32: error: expected
> unqualified-id before numeric constant
> build\_orekit\org\apache\commons\math\dfp\Dfp.cpp: In static member function
> 'static _jclass* org::apache::commons::math::dfp::Dfp::initializeClass()':
> build\_orekit\org\apache\commons\math\dfp\Dfp.cpp:100:79: error: lvalue
> required as left operand of assignment
> build\_orekit\org\apache\commons\math\dfp\Dfp.cpp: In static member function
> 'static void org::apache::commons::math::dfp::t_Dfp::initialize(PyObject*)':
> build\_orekit\org\apache\commons\math\dfp\Dfp.cpp:476:101: error: expected
> unqualified-id before numeric constant
> error: command 'gcc' failed with exit status 1

Reply via email to