[BUG] IFC4 does not compile
Describe the bug
The project OpenInfraPlatform.Core does not compile with IFC4.
In the Output, the first error message is:
(...)\Core\src\IfcGeometryConverter\PlacementConverter.h(586,1): error C2146: syntax error: missing '>' before identifier 'IfcLinearPlacement'
To Reproduce Steps to reproduce the behavior:
- In CMake, select the option
EARLYBINDING_WITH_IFC4 - Compile all steps according to SetupHelp.md
- The compiler error will appear during the project
OpenInfraPlatform.Core
Expected behavior Even with IFC4, I would expect the solution to compile.
CMake configuration If applicable, list any special configurations you have selected in CMake.
- EARLYBINDING_WITH_IFC4: selected
Additional context
According to the IFC documentation, the entity IfcLinearPlacement was introduced with IFC4x1 RC3 (link to documentation). Therefore, it will be some kind of undefined type in IFC4.
Probably, the option EARLYBINDING_WITH_IFC2x3 for IFC2x3 will bring up similar issues.
I was albe to find some kind of fix or work around with the if-condition
#if !(defined(OIP_MODULE_EARLYBINDING_IFC2X3) || defined(OIP_MODULE_EARLYBINDING_IFC4))
// some source code with IfcLinearPlacement
#endif
However, after IfcLinearPlacement was excluded from the code for IFC4, other IFC entities come up with the same problem. Currently, on my list are:
IfcLinearPlacementIfcDistanceExpressionIfcPointByDistanceExpressionIfcAxis2PlacementLinearIfcOrientationExpressionIfcPositioningElementIfcOffsetCurveIfcSectionedSolidIfcSectionedSolidHorizontal
At some point, the side effects on the entire namespace IfcGeometryConverter were to big to push a fast fix.
See #334 as well.