#65 compilation against occ 6.3.0 fails with gcc 4.4.1

open
nobody
None
5
2009-09-10
2009-09-10
Anonymous
No

When compiling occjava on ArchLinux 32 bit, it fails:

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I/opt/opencascade/inc -DLIN -I/opt/java/include -I/opt/java/include/linux -g -O2 -fno-strict-aliasing -MT OccJava_wrap.lo -MD -MP -MF .deps/OccJava_wrap.Tpo -c OccJava_wrap.cxx -fPIC -DPIC -o .libs/OccJava_wrap.o
In file included from /opt/opencascade/inc/Standard_OStream.hxx:8,
from /opt/opencascade/inc/Standard_ExtCharacter.hxx:24,
from /opt/opencascade/inc/Standard_PrimitiveTypes.hxx:29,
from /opt/opencascade/inc/GeomAbs_Shape.hxx:38,
from /opt/opencascade/inc/Adaptor3d_Curve.hxx:29,
from OccJava_wrap.cxx:217:
/opt/opencascade/inc/Standard_Stream.hxx:84: error: ‘std::setw’ has not been declared
/opt/opencascade/inc/Standard_Stream.hxx:85: error: ‘std::setprecision’ has not been declared

<snipped>

The fix was to to make the OccJava.i read:

%{
#ifndef WNT
//config.h generated by autotools from config.h.in (see an example in Opencascade).
#include "config.h"
#endif
#include <iomanip>
#include <Adaptor3d_Curve.hxx>
#include <TopExp.hxx>
#include <Poly_Triangulation.hxx>
%}

the added line is "#include <iomanip>". Not sure if this breaks something, but at least it compiles (the include found on heeks-cad compilation forum somewhere).

Hope this helps,

Vlad

Discussion