Compiling OCC5.2.4 with GCC4.0.1

I do not agree very with the method suggested in a post which changait the definition of the range of the function in the classes: to put in public private classes.
Then I tried to simply change the sources (I prepare a patch) by declaring the class before used has the new standard.
I succeeded has to launch compilation for these parts:
TKernel, TKMath, TKG2d, TKG3d, TKGeomBase, TKBRep, TKGeomAlgo, TKTopAlgo, TKPrim, TKBO, TKBool, TKHLR, TKFillet, TKOffset, TKFeat, TKService, TKV2d, TKV3d, TKOpenGl, TKMeshVS, PTKernel, TKPShape.
Arrived at the compilation of TKCDF the problem seems to be different callings are more of C than of C++. I work in a PASCAL and I is not a data processing specialist thus I need help on this part.

***************************************************************************************************

g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../inc -I../../../drv/CDM -I../../../src/CDM -I../../../drv/PCDM -I../../../src/PCDM -I../../../drv/CDF -I../../../src/CDF -I../../../drv/UTL -I../../../src/UTL -I../../../drv/LDOM -I../../../src/LDOM -g -O2 -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DNDEBUG -DLIN -DLININTEL -MT LDOMBasicString.lo -MD -MP -MF .deps/LDOMBasicString.Tpo -c ../../../src/LDOM/LDOMBasicString.cxx -fPIC -DPIC -o LDOMBasicString.lo
../../../inc/LDOM_Element.hxx:75: error: expected ',' or '...' before '&' token
../../../inc/LDOM_Element.hxx:76: error: ISO C++ forbids declaration of 'LDOM_BasicElement' with no type
../../../inc/LDOM_CharacterData.hxx:48: error: expected ',' or '...' before '&' token
../../../inc/LDOM_CharacterData.hxx:49: error: ISO C++ forbids declaration of 'LDOM_BasicText' with no type
../../../inc/LDOM_Text.hxx:38: error: expected ',' or '...' before '&' token
../../../inc/LDOM_Text.hxx:39: error: ISO C++ forbids declaration of 'LDOM_BasicText' with no type
../../../inc/LDOM_Text.hxx: In constructor 'LDOM_Text::LDOM_Text(int)':
../../../inc/LDOM_Text.hxx:40: error: 'theText' was not declared in this scope
../../../inc/LDOM_Text.hxx:40: error: 'theDoc' was not declared in this scope
../../../inc/LDOM_CDATASection.hxx: At global scope:
../../../inc/LDOM_CDATASection.hxx:37: error: expected ',' or '...' before '&' token
../../../inc/LDOM_CDATASection.hxx:38: error: ISO C++ forbids declaration of 'LDOM_BasicText' with no type
../../../inc/LDOM_CDATASection.hxx: In constructor 'LDOM_CDATASection::LDOM_CDATASection(int)':
../../../inc/LDOM_CDATASection.hxx:39: error: 'theText' was not declared in this scope
../../../inc/LDOM_CDATASection.hxx:39: error: 'theDoc' was not declared in this scope
../../../inc/LDOM_Comment.hxx: At global scope:
../../../inc/LDOM_Comment.hxx:37: error: expected ',' or '...' before '&' token
../../../inc/LDOM_Comment.hxx:38: error: ISO C++ forbids declaration of 'LDOM_BasicText' with no type
../../../inc/LDOM_Comment.hxx: In constructor 'LDOM_Comment::LDOM_Comment(int)':
../../../inc/LDOM_Comment.hxx:39: error: 'theText' was not declared in this scope
../../../inc/LDOM_Comment.hxx:39: error: 'theDoc' was not declared in this scope
make[3]: *** [LDOMBasicString.lo] Erreur 1
make[3]: Leaving directory `/home/gaby/Documents/Programmation/lcs/ros/adm/make/TKCDF'
make[2]: *** [all-recursive] Erreur 1
make[2]: Leaving directory `/home/gaby/Documents/Programmation/lcs/ros/adm/make'
make[1]: *** [all-recursive] Erreur 1
make[1]: Leaving directory `/home/gaby/Documents/Programmation/lcs/ros'
make: *** [all] Erreur 2

********************************************************************************************************

By looking at the headers I think that there is a problem of circular referencing somebody can it help me?

Best regards
Gabriel

Stefan Jansson's picture

Hi, I have run into the exact same problem.
Have you (or anyone else) any ideas how to get it compiling?

I'm using gcc 4.0.4.

Regards Stefan