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