Qt4 Viewer for OpenCASCADE compile with Open CASCADE 6.3 ?

Hi everybody,

I'm pretty new to OCC and I want to recompile Qt4 Viewer for OpenCASCADE from P Dolbey,
but it was compiled with Open CASCADE 6.2.0 and I dont have this version.
So I'm getting these six errors:

C:/OpenCASCADE6.3.0/ros/inc/Standard_Integer.hxx:119: error: `INT_MIN' was not declared in this scope
C:/OpenCASCADE6.3.0/ros/inc/Standard_Integer.hxx:125: error: `INT_MAX' was not declared in this scope
C:/OpenCASCADE6.3.0/ros/inc/Standard_Integer.hxx:131: error: `CHAR_BIT' was not declared in this scope
C:/OpenCASCADE6.3.0/ros/inc/Standard_Real.hxx:162: error: `CHAR_BIT' was not declared in this scope
C:/OpenCASCADE6.3.0/ros/inc/Standard_Real.hxx:283: error: `INT_MIN' was not declared in this scope
C:/OpenCASCADE6.3.0/os/inc/Standard_Real.hxx:283: error: `INT_MAX' was not declared in this scope

and in


there is a unresolved inclusion:


which isnt there since Open CASCADE 6.2.1

Anyone an idea or maybe a link where I can get Open CASCADE 6.2.0?

Thanks in advance


Dennis G.'s picture

Hello Sven,

1. add -DHAVE_LIMITS_H to your CXX-Defines; that should help with the errors,
2. Changes in version 6.2.1 over 6.2
• Data Exchange components (IGES, STEP) now use Message_Messenger class for outputting
messages (instead of cout or Message_Printer). This may affect output of messages by these
components. Several headers have been removed (Interface_DT.hxx,
Interface_TraceFile.hxx etc.) along with relevant aliases and macros. The facilities provided
by the package Message (see above) shall be used instead.

That is, Interface_DT.hxx simply doesn't exist anymore in OCC > 6.2.0

Best regards,


sven-kt's picture

Thanks, I've tried this(and also -DHAVE_IOSTREAM_H...) but the errors are still there..

Any Ideas?

ciplogic's picture

Those errors were for me only on Win32/MinGW setup. A solution may be to use VC++ Express. For this you may need to recompile Qt for Visual Studio compiler ( http://geeks.netindonesia.net/blogs/risman/archive/2009/04/02/qt-4-5-wit... )

Paul Jimenez's picture

INT_MIN, INT_MAX and CHAR_BIT belong to limits.h. Including that header file in the offending files should fix it. That's how I got around that problem too when compiling OCC with MinGW.

sven-kt's picture

OK, I got around the INT_MIN, INT_MAx errors, but now I am getting these:

src\qoccviewwidget.cpp:886: error: 'min' was not declared in this scope
src\qoccviewwidget.cpp:888: error: 'max' was not declared in this scope
src\qoccviewwidget.cpp:894: error: 'min' was not declared in this scope
src\qoccviewwidget.cpp:896: error: 'max' was not declared in this scope
src\qoccviewwidget.cpp:976: error: 'max' was not declared in this scope

Any ideas? (commenting those lines out leads to further errors)

P Dolbey's picture

Change min to std::min, max to std::max - its a consequence of changes to Qt post 4.5.0 rc1. You can see the qoccviewwidget's successor (qocc3dwidget) in svn here http://qtocc.svn.sourceforge.net/viewvc/qtocc/trunk/qtgeom/src/qocc/qocc... showing the related comment.

I should probably update the simple harness zip file sometime, but it became less important when OCC started supporting Qt4 from 6.3.0. The svn trunk primarily contains the qtgeom source that integrates with Fotis's SALOMEGEOMETRY conversionproject, but this is where most of my widget updates have been maintained.