From 6cab871678befc395c2c121dc9e916651006ec51 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 30 Dec 2021 15:12:56 +0100 Subject: [PATCH] Sketcher: fix build failures with MinGW --- src/Mod/Sketcher/App/GeoList.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Mod/Sketcher/App/GeoList.cpp b/src/Mod/Sketcher/App/GeoList.cpp index 289221427c..fc7139da39 100644 --- a/src/Mod/Sketcher/App/GeoList.cpp +++ b/src/Mod/Sketcher/App/GeoList.cpp @@ -352,7 +352,19 @@ GeoListModel>::~GeoListModel() // instantiate the types so that other translation units can access template constructors template class SketcherExport GeoListModel; +#if !defined(__MINGW32__) template class SketcherExport GeoListModel>; +#else +// Remark: It looks like when implementing a method of GeoListModel for GeometryFacadeUniquePtr then under MinGW +// the explicit template instantiation doesn't do anything. As workaround all other methods must be declared separately +template SketcherExport const Part::Geometry* GeoListModel::getGeometryFromGeoId(int geoId) const; +template SketcherExport const Sketcher::GeometryFacade* GeoListModel::getGeometryFacadeFromGeoId(int geoId) const; +template SketcherExport int GeoListModel::getGeoIdFromGeomListIndex(int index) const; +template SketcherExport int GeoListModel::getVertexIdFromGeoElementId(const Sketcher::GeoElementId &) const; +template SketcherExport GeoElementId GeoListModel::getGeoElementIdFromVertexId(int); +template SketcherExport Base::Vector3d GeoListModel::getPoint(int geoId, Sketcher::PointPos pos) const; +template SketcherExport Base::Vector3d GeoListModel::getPoint(const GeoElementId &) const; +#endif } // namespace Sketcher