[mingw-polyclipping] export std::vector specializations from DLL
sailer
sailer at fedoraproject.org
Thu Mar 7 14:42:57 UTC 2013
commit 766d2a34eb2c8afed138034af40eff877bfa9319
Author: Thomas Sailer <t.sailer at alumni.ethz.ch>
Date: Thu Mar 7 15:41:58 2013 +0100
export std::vector specializations from DLL
mingw-polyclipping.spec | 5 ++++-
polyclipping.patch | 46 ++++++++++++++++++++++++++++++++++++----------
2 files changed, 40 insertions(+), 11 deletions(-)
---
diff --git a/mingw-polyclipping.spec b/mingw-polyclipping.spec
index 2267fca..e60a40c 100644
--- a/mingw-polyclipping.spec
+++ b/mingw-polyclipping.spec
@@ -10,7 +10,7 @@
Name: mingw-%{mingw_pkg_name}
Version: 5.1.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: MinGW Windows Polygon clipping library
Group: System Environment/Libraries
@@ -119,6 +119,9 @@ popd
%changelog
+* Thu Mar 7 2013 Thomas Sailer <t.sailer at alumni.ethz.ch> - 5.1.2-2
+- export std::vector specializations from DLL as well
+
* Sun Jan 27 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.0.3-4
- Rebuild against mingw-gcc 4.8 (win64 uses SEH exceptions now)
diff --git a/polyclipping.patch b/polyclipping.patch
index 04edfbc..8137b65 100644
--- a/polyclipping.patch
+++ b/polyclipping.patch
@@ -28,16 +28,30 @@
SET_TARGET_PROPERTIES(polyclipping PROPERTIES VERSION 8.0.0 SOVERSION 8 )
\ No newline at end of file
--- cpp/clipper.hpp.mingw 2013-02-26 04:39:24.000000000 +0100
-+++ cpp/clipper.hpp 2013-03-05 12:03:26.300035461 +0100
-@@ -40,6 +40,16 @@
++++ cpp/clipper.hpp 2013-03-07 15:39:27.253160787 +0100
+@@ -34,12 +34,30 @@
+ #ifndef clipper_hpp
+ #define clipper_hpp
+
++// KB168958
++// disable warnings on 255 char debug symbols
++#pragma warning (disable : 4786)
++// disable warnings on extern before template instantiation
++#pragma warning (disable : 4231)
++
+ #include <vector>
+ #include <stdexcept>
+ #include <cstring>
#include <cstdlib>
#include <ostream>
+#if defined (_WIN32)
+ #if defined(polyclipping_EXPORTS)
+ #define CLIPPER_EXPORT __declspec(dllexport)
++ #define CLIPPER_IMPEXP
+ #else
+ #define CLIPPER_EXPORT __declspec(dllimport)
++ #define CLIPPER_IMPEXP extern
+ #endif /* polyclipping_EXPORTS */
+#else /* defined (_WIN32) */
+ #define CLIPPER_EXPORT
@@ -46,7 +60,7 @@
namespace ClipperLib {
enum ClipType { ctIntersection, ctUnion, ctDifference, ctXor };
-@@ -53,7 +63,7 @@
+@@ -53,7 +71,7 @@
typedef signed long long long64;
typedef unsigned long long ulong64;
@@ -55,10 +69,11 @@
public:
long64 X;
long64 Y;
-@@ -65,13 +75,13 @@
+@@ -64,14 +82,13 @@
+ typedef std::vector< IntPoint > Polygon;
typedef std::vector< Polygon > Polygons;
-
+-
-std::ostream& operator <<(std::ostream &s, Polygon &p);
-std::ostream& operator <<(std::ostream &s, Polygons &p);
+CLIPPER_EXPORT std::ostream& operator <<(std::ostream &s, Polygon &p);
@@ -72,7 +87,7 @@
{
public:
PolyNode();
-@@ -88,7 +98,7 @@
+@@ -88,7 +105,7 @@
friend class Clipper; //to access Index
};
@@ -81,7 +96,7 @@
{
public:
~PolyTree(){Clear();};
-@@ -102,23 +112,23 @@
+@@ -102,23 +119,23 @@
enum JoinType { jtSquare, jtRound, jtMiter };
@@ -116,7 +131,7 @@
//used internally ...
enum EdgeSide { esLeft = 1, esRight = 2};
-@@ -211,7 +221,7 @@
+@@ -211,7 +228,7 @@
//ClipperBase is the ancestor to the Clipper class. It should not be
//instantiated directly. This class simply abstracts the conversion of sets of
//polygon coordinates into edge objects that are stored in a LocalMinima list.
@@ -125,7 +140,7 @@
{
public:
ClipperBase();
-@@ -232,7 +242,7 @@
+@@ -232,7 +249,7 @@
EdgeList m_edges;
};
@@ -134,7 +149,7 @@
{
public:
Clipper();
-@@ -324,7 +334,7 @@
+@@ -324,7 +341,7 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
@@ -143,3 +158,14 @@
{
public:
clipperException(const char* description): m_descr(description) {}
+@@ -337,6 +354,10 @@
+
+ } //ClipperLib namespace
+
++CLIPPER_IMPEXP template class CLIPPER_EXPORT std::vector< ClipperLib::Polygon >;
++CLIPPER_IMPEXP template class CLIPPER_EXPORT std::vector< ClipperLib::Polygons >;
++CLIPPER_IMPEXP template class CLIPPER_EXPORT std::vector< ClipperLib::PolyNode* >;
++
+ #endif //clipper_hpp
+
+
More information about the scm-commits
mailing list