Fix examples linking errors for shared build (incorrect attributes order)

E.g. IfcAdvancedHouse:
```
/usr/bin/x86_64-linux-gnu-ld.bfd: CMakeFiles/IfcAdvancedHouse.dir/IfcAdvancedHouse.cpp.o: in function `main':
IfcAdvancedHouse.cpp:(.text.startup.main+0x137): undefined reference to `hierarchy_helper<Ifc4x3_add2>::addBuilding(Ifc4x3_add2::IfcSite, Ifc4x3_add2::IfcOwnerHistory)'
/usr/bin/x86_64-linux-gnu-ld.bfd: IfcAdvancedHouse.cpp:(.text.startup.main+0x7c7): undefined reference to `hierarchy_helper<Ifc4x3_add2>::getRepresentationContext(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/x86_64-linux-gnu-ld.bfd: IfcAdvancedHouse.cpp:(.text.startup.main+0x931): undefined reference to `hierarchy_helper<Ifc4x3_add2>::getRepresentationContext(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
```

Noticed by addressing gcc warning gcc warning that attribute order is incorrect:
```
//src/ifcparse/hierarchy_helper.i:721:31: warning: attribute ignored in explicit instantiation ‘class hierarchy_helper<Ifc2x3>’ [-Wattributes]
  721 | template IFC_SCHEMA_API class hierarchy_helper<IfcSchema>;
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
//src/ifcparse/hierarchy_helper.i:721:31: note: no attribute can be applied to an explicit instantiation
```
This commit is contained in:
Andrej730
2026-08-14 17:38:47 +05:00
parent 665502cbc5
commit e100cf5a34
+1 -1
View File
@@ -718,7 +718,7 @@ typename Schema::IfcGeometricRepresentationSubContext hierarchy_helper<Schema>::
return rep_subcontext;
}
template IFC_SCHEMA_API class hierarchy_helper<IfcSchema>;
template class IFC_SCHEMA_API hierarchy_helper<IfcSchema>;
template IFC_SCHEMA_API ifcopenshell::hierarchy_detail::surface_style_type<IfcSchema>
addStyleAssignment<IfcSchema>(hierarchy_helper<IfcSchema>&, double, double, double, double);