aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/qpdf/DLL.h5
-rw-r--r--include/qpdf/QPDFExc.hh2
-rw-r--r--include/qpdf/QPDFSystemError.hh2
3 files changed, 7 insertions, 2 deletions
diff --git a/include/qpdf/DLL.h b/include/qpdf/DLL.h
index ccd05fce..1e5d8a1a 100644
--- a/include/qpdf/DLL.h
+++ b/include/qpdf/DLL.h
@@ -25,8 +25,13 @@
#if defined(_WIN32) && defined(DLL_EXPORT)
# define QPDF_DLL __declspec(dllexport)
+# define QPDF_DLL_EXCEPTION
+#elif __GNUC__ >= 4
+# define QPDF_DLL __attribute__ ((visibility ("default")))
+# define QPDF_DLL_EXCEPTION __attribute__ ((visibility ("default")))
#else
# define QPDF_DLL
+# define QPDF_DLL_EXCEPTION
#endif
#endif /* QPDF_DLL_HH */
diff --git a/include/qpdf/QPDFExc.hh b/include/qpdf/QPDFExc.hh
index fe0aa1d5..c538eb4d 100644
--- a/include/qpdf/QPDFExc.hh
+++ b/include/qpdf/QPDFExc.hh
@@ -29,7 +29,7 @@
#include <string>
#include <stdexcept>
-class QPDFExc: public std::runtime_error
+class QPDF_DLL_EXCEPTION QPDFExc: public std::runtime_error
{
public:
QPDF_DLL
diff --git a/include/qpdf/QPDFSystemError.hh b/include/qpdf/QPDFSystemError.hh
index c4e48713..cef8ea08 100644
--- a/include/qpdf/QPDFSystemError.hh
+++ b/include/qpdf/QPDFSystemError.hh
@@ -29,7 +29,7 @@
#include <string>
#include <stdexcept>
-class QPDFSystemError: public std::runtime_error
+class QPDF_DLL_EXCEPTION QPDFSystemError: public std::runtime_error
{
public:
QPDF_DLL