Below are modifications I have done to compile occ 5.2 on gentoo AMD64 with gcc3.4.4 and tk/tcl8.4:
--- ros/inc/TColStd_ListOfInteger.hxx 2005-11-10 23:29:54.000000000 +0100
+++ ros/inc/TColStd_ListOfInteger.hxx 2005-11-10 23:30:08.000000000 +0100
@@ -109,7 +109,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/Extrema_SequenceOfPOnCurv.hxx 2005-11-10 23:16:59.000000000 +0100
+++ ros/inc/Extrema_SequenceOfPOnCurv.hxx 2005-11-10 23:17:07.000000000 +0100
@@ -116,7 +116,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/GeomFill_SequenceOfTrsf.hxx 2005-11-10 23:21:48.000000000 +0100
+++ ros/inc/GeomFill_SequenceOfTrsf.hxx 2005-11-10 23:22:01.000000000 +0100
@@ -116,7 +116,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/HLRBRep_ListOfBPoint.hxx 2005-11-11 10:30:44.000000000 +0100
+++ ros/inc/HLRBRep_ListOfBPoint.hxx 2005-11-11 10:30:57.000000000 +0100
@@ -110,7 +110,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/Extrema_SequenceOfPOnCurv2d.hxx 2005-11-10 23:11:14.000000000 +0100
+++ ros/inc/Extrema_SequenceOfPOnCurv2d.hxx 2005-11-10 23:11:32.000000000 +0100
@@ -116,7 +116,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/WOKTCL_DefaultCommand.hxx 2005-11-10 23:38:02.000000000 +0100
+++ ros/inc/WOKTCL_DefaultCommand.hxx 2005-11-10 23:39:12.000000000 +0100
@@ -16,7 +16,7 @@
Standard_Integer DefaultCommand(ClientData , Tcl_Interp *,
- Standard_Integer , char* []);
+ Standard_Integer , const char* []);
void DefaultCommandDelete (ClientData );
--- ros/inc/Extrema_SequenceOfPOnSurf.hxx 2005-11-10 23:18:49.000000000 +0100
+++ ros/inc/Extrema_SequenceOfPOnSurf.hxx 2005-11-10 23:18:58.000000000 +0100
@@ -116,7 +116,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/Draw_PluginMacro.hxx 2005-11-11 10:37:20.000000000 +0100
+++ ros/inc/Draw_PluginMacro.hxx 2005-11-11 10:37:32.000000000 +0100
@@ -17,7 +17,7 @@
#define DPLUGIN(name) \
extern "C" {Standard_EXPORT void PLUGINFACTORY(Draw_Interpretor&);} \
void PLUGINFACTORY(Draw_Interpretor& theDI) { \
- name##::Factory(theDI);} \
+ name::Factory(theDI);} \
\
#endif
--- ros/inc/Plugin_Macro.hxx 2005-11-12 11:50:27.000000000 +0100
+++ ros/inc/Plugin_Macro.hxx 2005-11-12 11:50:35.000000000 +0100
@@ -18,7 +18,7 @@
#define PLUGIN(name) \
extern "C" {Standard_EXPORT Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID&);} \
Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID& aGUID) { \
- return name##::Factory(aGUID);}\
+ return name::Factory(aGUID);}\
\
#endif
--- ros/inc/AIS2D_DataMapOfPrimAspects.hxx 2005-11-11 00:29:21.000000000 +0100
+++ ros/inc/AIS2D_DataMapOfPrimAspects.hxx 2005-11-11 00:29:36.000000000 +0100
@@ -118,7 +118,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TColgp_SequenceOfPnt.hxx 2005-11-10 23:39:22.000000000 +0100
+++ ros/inc/TColgp_SequenceOfPnt.hxx 2005-11-10 23:39:39.000000000 +0100
@@ -116,7 +116,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/Prs2d_DataMapOfAspectRoot.hxx 2005-11-11 00:41:31.000000000 +0100
+++ ros/inc/Prs2d_DataMapOfAspectRoot.hxx 2005-11-11 00:41:42.000000000 +0100
@@ -114,7 +114,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC2d.hxx 2005-11-10 23:13:16.000000000 +0100
+++ ros/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC2d.hxx 2005-11-10 23:13:25.000000000 +0100
@@ -116,7 +116,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/BRepBlend_SequenceOfPointOnRst.hxx 2005-11-11 00:09:03.000000000 +0100
+++ ros/inc/BRepBlend_SequenceOfPointOnRst.hxx 2005-11-11 00:09:13.000000000 +0100
@@ -116,7 +116,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC.hxx 2005-11-10 23:20:11.000000000 +0100
+++ ros/inc/Extrema_SeqPCOfPCFOfEPCOfExtPC.hxx 2005-11-10 23:20:19.000000000 +0100
@@ -116,7 +116,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TColgp_Array1OfPnt2d.hxx 2005-11-11 08:29:40.000000000 +0100
+++ ros/inc/TColgp_Array1OfPnt2d.hxx 2005-11-11 08:29:54.000000000 +0100
@@ -110,7 +110,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TDF_IDMap.hxx 2005-11-11 09:35:06.000000000 +0100
+++ ros/inc/TDF_IDMap.hxx 2005-11-11 09:35:13.000000000 +0100
@@ -97,7 +97,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TColStd_MapOfInteger.hxx 2005-11-10 23:30:35.000000000 +0100
+++ ros/inc/TColStd_MapOfInteger.hxx 2005-11-10 23:30:44.000000000 +0100
@@ -97,7 +97,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TColStd_SequenceOfReal.hxx 2005-11-10 23:02:40.000000000 +0100
+++ ros/inc/TColStd_SequenceOfReal.hxx 2005-11-10 23:02:56.000000000 +0100
@@ -118,7 +118,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/PCDM_ReferenceIterator.hxx 2005-11-11 09:29:42.000000000 +0100
+++ ros/inc/PCDM_ReferenceIterator.hxx 2005-11-11 09:29:56.000000000 +0100
@@ -101,7 +101,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/BRepCheck_ListOfStatus.hxx 2005-11-10 23:34:50.000000000 +0100
+++ ros/inc/BRepCheck_ListOfStatus.hxx 2005-11-10 23:35:32.000000000 +0100
@@ -112,7 +112,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TColStd_SequenceOfHAsciiString.hxx 2005-11-11 13:15:30.000000000 +0100
+++ ros/inc/TColStd_SequenceOfHAsciiString.hxx 2005-11-11 13:15:46.000000000 +0100
@@ -119,7 +119,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TColStd_SequenceOfInteger.hxx 2005-11-10 23:12:49.000000000 +0100
+++ ros/inc/TColStd_SequenceOfInteger.hxx 2005-11-10 23:12:57.000000000 +0100
@@ -115,7 +115,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TopTools_ListOfShape.hxx 2005-11-10 23:36:48.000000000 +0100
+++ ros/inc/TopTools_ListOfShape.hxx 2005-11-10 23:36:57.000000000 +0100
@@ -110,7 +110,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TDF_Transaction.hxx 2005-11-11 09:34:41.000000000 +0100
+++ ros/inc/TDF_Transaction.hxx 2005-11-11 09:34:55.000000000 +0100
@@ -99,7 +99,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/Graphic2d_Buffer.hxx 2005-11-11 00:22:22.000000000 +0100
+++ ros/inc/Graphic2d_Buffer.hxx 2005-11-11 00:22:39.000000000 +0100
@@ -157,7 +157,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/PCollection_HSequence.gxx 2005-11-11 09:09:02.000000000 +0100
+++ ros/inc/PCollection_HSequence.gxx 2005-11-11 09:10:25.000000000 +0100
@@ -37,13 +37,13 @@
FirstItem = FirstItem->Next();
FirstItem->SetPrevious(pnul);
#ifndef CSFDB
- cell.Delete();
+ // cell.Delete();
#endif
--Size;
}
FirstItem.Nullify();
#ifndef CSFDB
- LastItem.Delete(); // free memory
+ // LastItem.Delete(); // free memory
#endif
Size = 0;
}
@@ -345,7 +345,7 @@
Size = 0;
FirstItem.Nullify();
#ifndef CSFDB
- LastItem.Delete(); // free memory
+ // LastItem.Delete(); // free memory
#endif
}
else {
@@ -356,7 +356,7 @@
FirstItem = FirstItem->Next();
FirstItem->SetPrevious(pnul);
#ifndef CSFDB
- cell.Delete(); // free memory
+ // cell.Delete(); // free memory
#endif
--Size;
} else if ( Index == Size ) { // Remove the last Index
@@ -364,7 +364,7 @@
LastItem = LastItem->Previous();
LastItem->SetNext(pnul);
#ifndef CSFDB
- cell.Delete(); // free memory
+ // cell.Delete(); // free memory
#endif
--Size;
} else {
@@ -379,7 +379,7 @@
previous->SetNext(next);
next->SetPrevious(previous);
#ifndef CSFDB
- cell.Delete(); // free memory
+ // cell.Delete(); // free memory
#endif
--Size;
}
--- ros/inc/Extrema_SequenceOfBoolean.hxx 2005-11-10 23:15:39.000000000 +0100
+++ ros/inc/Extrema_SequenceOfBoolean.hxx 2005-11-10 23:15:49.000000000 +0100
@@ -118,7 +118,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TopOpeBRepBuild_ListOfShapeListOfShape.hxx 2005-11-10 23:55:10.000000000 +0100
+++ ros/inc/TopOpeBRepBuild_ListOfShapeListOfShape.hxx 2005-11-10 23:55:22.000000000 +0100
@@ -110,7 +110,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/AIS2D_DataMapOfLocStat.hxx 2005-11-11 00:31:14.000000000 +0100
+++ ros/inc/AIS2D_DataMapOfLocStat.hxx 2005-11-11 00:31:26.000000000 +0100
@@ -118,7 +118,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/DBC_DBVArray.hxx 2005-11-11 09:06:16.000000000 +0100
+++ ros/inc/DBC_DBVArray.hxx 2005-11-11 09:22:51.000000000 +0100
@@ -19,5 +19,6 @@
#include
typedef PStandard_ArrayNode* DBC_DBVArray;
#endif
-
+#include
+typedef PStandard_ArrayNode* DBC_DBVArray;
#endif
--- ros/inc/TopOpeBRepDS_ListOfInterference.hxx 2005-11-10 23:57:17.000000000 +0100
+++ ros/inc/TopOpeBRepDS_ListOfInterference.hxx 2005-11-10 23:57:28.000000000 +0100
@@ -113,7 +113,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/Approx_SequenceOfHArray1OfReal.hxx 2005-11-10 23:05:57.000000000 +0100
+++ ros/inc/Approx_SequenceOfHArray1OfReal.hxx 2005-11-10 23:06:10.000000000 +0100
@@ -119,7 +119,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TopOpeBRepTool_ListOfC2DF.hxx 2005-11-11 00:01:43.000000000 +0100
+++ ros/inc/TopOpeBRepTool_ListOfC2DF.hxx 2005-11-11 00:02:02.000000000 +0100
@@ -110,7 +110,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/BOP_ListOfLoop.hxx 2005-11-10 23:45:17.000000000 +0100
+++ ros/inc/BOP_ListOfLoop.hxx 2005-11-10 23:45:26.000000000 +0100
@@ -113,7 +113,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/AppParCurves_SequenceOfMultiCurve.hxx 2005-11-10 23:02:04.000000000 +0100
+++ ros/inc/AppParCurves_SequenceOfMultiCurve.hxx 2005-11-10 23:02:22.000000000 +0100
@@ -116,7 +116,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/math_IntegerVector.hxx 2005-11-10 23:24:39.000000000 +0100
+++ ros/inc/math_IntegerVector.hxx 2005-11-10 23:24:48.000000000 +0100
@@ -166,7 +166,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TopOpeBRepBuild_ListOfLoop.hxx 2005-11-10 23:53:12.000000000 +0100
+++ ros/inc/TopOpeBRepBuild_ListOfLoop.hxx 2005-11-10 23:53:24.000000000 +0100
@@ -113,7 +113,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/Graphic2d_Primitive.hxx 2005-11-11 00:19:56.000000000 +0100
+++ ros/inc/Graphic2d_Primitive.hxx 2005-11-11 00:20:11.000000000 +0100
@@ -188,7 +188,7 @@
Standard_Integer myDisplayMode;
-private:
+public:
// Methods PRIVATE
//
--- ros/inc/TopTools_Array1OfListOfShape.hxx 2005-11-11 00:03:56.000000000 +0100
+++ ros/inc/TopTools_Array1OfListOfShape.hxx 2005-11-11 00:04:06.000000000 +0100
@@ -110,7 +110,7 @@
//
-private:
+public:
// Methods PRIVATE
//
--- ros/src/Draw/Draw_Window.cxx 2005-11-10 23:37:16.000000000 +0100
+++ ros/src/Draw/Draw_Window.cxx 2005-11-10 23:37:42.000000000 +0100
@@ -44,7 +44,7 @@
{
- char *promptCmd;
+ const char *promptCmd;
int code;
Tcl_Channel outChannel, errChannel;
outChannel = Tcl_GetStdChannel(TCL_STDOUT);
--- ros/src/Draw/Draw_VariableCommands.cxx 2005-11-10 23:33:46.000000000 +0100
+++ ros/src/Draw/Draw_VariableCommands.cxx 2005-11-10 23:36:31.000000000 +0100
@@ -644,7 +644,7 @@
Draw::Set(name,D,autodisp);
}
-static char* tracevar(ClientData CD, Tcl_Interp*, char*, char*, Standard_Integer)
+static char* tracevar(ClientData CD, Tcl_Interp*, const char*, const char*, Standard_Integer)
{
// protect if the map was destroyed before the interpretor
if (theVariables.IsEmpty()) return NULL;
@@ -688,7 +688,7 @@
if (!D.IsNull()) {
Standard_Integer ival = theVariables.Extent() + 1;
theVariables.Bind(ival,D);
- D->Name(Tcl_SetVar(theCommands.Interp(),name,name,0));
+ D->Name((const Standard_CString) Tcl_SetVar(theCommands.Interp(),name,name,0));
// set the trace function
Tcl_TraceVar(theCommands.Interp(),name,TCL_TRACE_UNSETS,
--- ros/src/Draw/Draw_Interpretor.cxx 2005-11-10 23:32:33.000000000 +0100
+++ ros/src/Draw/Draw_Interpretor.cxx 2005-11-10 23:33:35.000000000 +0100
@@ -25,7 +25,7 @@
static Standard_Integer CommandCmd
(ClientData clientData, Tcl_Interp *interp,
- Standard_Integer argc, char* argv[])
+ Standard_Integer argc, const char* argv[])
{
static Standard_Integer code;
code = TCL_OK;
@@ -42,7 +42,7 @@
Handle(Standard_Failure) E = Standard_Failure::Caught();
// fail if Draw_ExitOnCatch is set
- char* const cc = Tcl_GetVar(interp,
+ const char* cc = Tcl_GetVar(interp,
"Draw_ExitOnCatch",TCL_GLOBAL_ONLY);
cout << "An exception was caught " << E << endl;
--- ros/src/WOKTclTools/WOKTclTools_Interpretor.cxx 2005-11-10 23:43:28.000000000 +0100
+++ ros/src/WOKTclTools/WOKTclTools_Interpretor.cxx 2005-11-11 13:27:46.000000000 +0100
@@ -57,14 +57,14 @@
Standard_EXPORT Handle(WOKTclTools_Interpretor) CurrentInterp;
static Standard_Integer CommandCmd (ClientData clientData, Tcl_Interp *,
- Standard_Integer argc, char* argv[])
+ Standard_Integer argc, const char* argv[])
{
CData* C = (CData*) clientData;
// set de l'interprete en cours
CurrentInterp = C->i;
- if (C->f(C->i,argc,argv) == 0)
+ if (C->f(C->i,argc, (char** const&) argv) == 0)
{
CurrentInterp.Nullify();
return TCL_OK;
@@ -77,7 +77,7 @@
}
static Standard_Integer WOKCommand(ClientData clientData, Tcl_Interp *,
- Standard_Integer argc, char* argv[])
+ Standard_Integer argc, const char* argv[])
{
WOKCData* C = (WOKCData*) clientData;
@@ -94,7 +94,7 @@
WOKUtils_ProcessManager::Arm();
// appel de la fonction API
- if(!(*acmd)(argc, argv, returns))
+ if(!(*acmd)(argc, (char** const&) argv, returns))
{
if(!C->i->TreatReturn(returns))
{
@@ -110,7 +110,7 @@
Standard_SStream astream;
astream << E << ends;
- ErrorMsg << argv[0] << "Exception was raised : " << GetSString(astream) << endm;
+ ErrorMsg << (char*) argv[0] << "Exception was raised : " << GetSString(astream) << endm;
WOKUtils_ProcessManager::UnArm();
return TCL_ERROR;
}
@@ -440,7 +440,7 @@
Standard_Integer argc,i;
Standard_CString* argv;
- if(Tcl_SplitList(myInterp, myInterp->result, &argc, &argv)) return Standard_True;
+ if(Tcl_SplitList(myInterp, myInterp->result, &argc, (const char***) argv)) return Standard_True;
for(i=0; i
#include
-extern int errno;
+#include ;
static Handle(IGESData_FileProtocol) protocol;
--- ros/src/WOKTCL/WOKTCL_DefaultCommand.cxx 2005-11-10 23:40:49.000000000 +0100
+++ ros/src/WOKTCL/WOKTCL_DefaultCommand.cxx 2005-11-10 23:42:15.000000000 +0100
@@ -45,7 +45,7 @@
Standard_IMPORT Handle(WOKTclTools_Interpretor) CurrentInterp;
Standard_Integer DefaultCommand(ClientData clientData, Tcl_Interp *,
- Standard_Integer argc, char* argv[])
+ Standard_Integer argc, const char* argv[])
{
volatile Standard_Integer status = 0;
@@ -68,7 +68,7 @@
WOKUtils_ProcessManager::Arm();
// appel de la fonction API
- if(!(*acmd)(C->i->Session(), argc, argv, returns))
+ if(!(*acmd)(C->i->Session(), argc, (char** const&) argv, returns))
{
if(!C->i->TreatReturn(returns))
{
@@ -88,7 +88,7 @@
Standard_SStream astream;
astream << E << ends;
- ErrorMsg << argv[0] << "Exception was raised : " << GetSString(astream) << endm;
+ ErrorMsg << (char*) argv[0] << "Exception was raised : " << GetSString(astream) << endm;
WOKAPI_Session* asess = (WOKAPI_Session *) &(C->i->Session());
asess->GeneralFailure(E);
--- ros/src/FWOSDriver/FWOSDriver.cxx 2005-11-11 09:41:23.000000000 +0100
+++ ros/src/FWOSDriver/FWOSDriver.cxx 2001-09-21 09:51:04.000000000 +0200
@@ -1,26 +1,18 @@
-// File: PlugIn_Macro.hxx
-// Created: Tue Mar 4 10:47:14 1997
+// File: FWOSDriver.cxx
+// Created: Tue Mar 4 16:38:53 1997
// Author: Mister rmi
//
-#ifndef _PlugIn_Macro_HeaderFile
-#define _PlugIn_Macro_HeaderFile
+#include
+#include
-#if defined (__hpux) || defined (HPUX)
-#define PLUGIN(name) \
-extern "C" {Standard_EXPORT Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID&);} \
-Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID& aGUID) { \
- return name::Factory(aGUID);}\
-\
-
-#else
-#define PLUGIN(name) \
-extern "C" {Standard_EXPORT Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID&);} \
-Handle(Standard_Transient) PLUGINFACTORY(const Standard_GUID& aGUID) { \
- return name##::Factory(aGUID);}\
-\
-
-#endif
+#include
-#endif
+PLUGIN(FWOSDriver)
+
+Handle(Standard_Transient) FWOSDriver::Factory(const Standard_GUID& aGUID) {
+ static Handle(FWOSDriver_DriverFactory) f;
+ if(f.IsNull()) f = new FWOSDriver_DriverFactory;
+ return f;
+}
--- ros/src/WOKUnix/WOKUnix_FDescr.cxx 2005-11-10 23:28:34.000000000 +0100
+++ ros/src/WOKUnix/WOKUnix_FDescr.cxx 2005-11-10 23:28:59.000000000 +0100
@@ -39,7 +39,7 @@
extern "C" { extern int mknod (const char *, mode_t , dev_t ); }
-extern int errno;
+#include ;
const OSD_WhoAmI Iam = OSD_WFile;
You can put this datas into a file and use patch -p0 < file to apply the changes.
and my configuration :
./configure --with-tcl=/usr/lib64/ --with-tk=/usr/lib64/ --with-dps-library=/usr/lib64/ --with-xmu-library=/usr/lib64/ --with-stlport-library=/usr/lib64 --with-gl-library=/usr/X11R6/lib/ --with-java-include=/opt/sun-jdk-1.5.0.05/include/ --prefix=/usr/opencascade5.2 --with-xmu-include=/usr/include/X11 --with-stlport-libname=stlport_gcc