From 69a7ee03ebf526756697ac21570c38c42aa04f57 Mon Sep 17 00:00:00 2001 From: tchernobog Date: Thu, 20 Jul 2006 11:11:37 +0000 Subject: [PATCH] - Fix visibility support into string_utils git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@786 3ecf2c5c-341e-0410-92b4-d18e462d057c --- configure.ac | 2 +- src/backend/string_utils.cc | 13 +++++++++---- src/backend/string_utils.hh | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index a4791bc..35fabcc 100644 --- a/configure.ac +++ b/configure.ac @@ -56,7 +56,7 @@ AM_GNU_GETTEXT_VERSION([0.14.1]) dnl various requisites SIGCPP_VERSION=2.0.10 GTKMM_VERSION=2.8.0 -LIBGLADEMM_VERSION=2.6.1 +LIBGLADEMM_VERSION=2.6.0 CAIRO_VERSION=1.0.0 dnl c++ compiler and flags diff --git a/src/backend/string_utils.cc b/src/backend/string_utils.cc index 37206c2..5ed29cf 100644 --- a/src/backend/string_utils.cc +++ b/src/backend/string_utils.cc @@ -29,6 +29,14 @@ using Glib::ustring; namespace sgpem { + /* Force template instantiation to allow visibility outside this DSO */ +template SG_DLLEXPORT int string_to(const Glib::ustring&); +template SG_DLLEXPORT float string_to(const Glib::ustring&); + + // Specialized further down in this file: + // template SG_DLLEXPORT bool string_to(const Glib::ustring&); + + /** \brief A function that converts a Unicode string to an integer value @@ -105,7 +113,7 @@ string_to(const ustring& str) throw(domain_error) } template <> -bool +SG_DLLEXPORT bool string_to(const Glib::ustring& str) throw(domain_error) { if(tokenize(str).size() != 1) @@ -227,7 +235,4 @@ tokenize(const ustring& str) return tokens; } -template int string_to(const Glib::ustring&); -template float string_to(const Glib::ustring&); -template bool string_to(const Glib::ustring&); } diff --git a/src/backend/string_utils.hh b/src/backend/string_utils.hh index 2341763..167379f 100644 --- a/src/backend/string_utils.hh +++ b/src/backend/string_utils.hh @@ -71,7 +71,7 @@ namespace sgpem */ void SG_DLLEXPORT string_to_float(const Glib::ustring&, float&); - Tokens tokenize(const Glib::ustring& str); + Tokens SG_DLLEXPORT tokenize(const Glib::ustring& str); } #endif