From f7f73bdd00a5b38e027ff8200cc7c9caa9c46c77 Mon Sep 17 00:00:00 2001
From: Francois Keith <francois.keith@gmail.com>
Date: Thu, 14 Apr 2011 18:48:02 +0200
Subject: [PATCH] Win32: Correct the API of exception-python.hh

---
 include/dynamic-graph/python/exception-python.hh | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/include/dynamic-graph/python/exception-python.hh b/include/dynamic-graph/python/exception-python.hh
index 5374d4b..d0b84ab 100644
--- a/include/dynamic-graph/python/exception-python.hh
+++ b/include/dynamic-graph/python/exception-python.hh
@@ -20,16 +20,27 @@
 # include <string>
 
 # include <dynamic-graph/fwd.hh>
-# include <dynamic-graph/dynamic-graph-api.h>
 # include <dynamic-graph/exception-abstract.h>
 
+// Depending on whether one is building or using the
+// library define DLLAPI to import or export.
+# if defined (WIN32)
+#   if defined (wrap_EXPORTS)
+#     define WRAP_DLLAPI __declspec(dllexport)
+#   else
+#     define WRAP_DLLAPI __declspec(dllimport)
+#   endif
+# else
+#   define WRAP_DLLAPI
+# endif
+
 namespace dynamicgraph {
   namespace python {
 
     /// \ingroup error
     ///
     /// \brief Generic error class.
-    class DYNAMIC_GRAPH_DLLAPI ExceptionPython : public ExceptionAbstract
+    class WRAP_DLLAPI ExceptionPython : public ExceptionAbstract
     {
     public:
       enum ErrorCodeEnum
-- 
GitLab