From fb9b71b9cc12c3cc93fe7c68efbc1200332e53ff Mon Sep 17 00:00:00 2001 From: Philippose Rajan Date: Sun, 19 Apr 2009 22:10:55 +0000 Subject: [PATCH] * Added DLL_HEADER exports to template specializations (Used in NgSolve) --- libsrc/include/nginterface_v2.hpp | 6 ++---- ng/nginterface_v2.cpp | 14 ++++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/libsrc/include/nginterface_v2.hpp b/libsrc/include/nginterface_v2.hpp index 82bfe2c8..22769c37 100644 --- a/libsrc/include/nginterface_v2.hpp +++ b/libsrc/include/nginterface_v2.hpp @@ -24,9 +24,7 @@ public: -template -DLL_HEADER int Ng_GetNElements (); +template DLL_HEADER int Ng_GetNElements (); -template -DLL_HEADER Ng_Element Ng_GetElement (int nr); +template DLL_HEADER Ng_Element Ng_GetElement (int nr); diff --git a/ng/nginterface_v2.cpp b/ng/nginterface_v2.cpp index 579a319b..3beb388e 100644 --- a/ng/nginterface_v2.cpp +++ b/ng/nginterface_v2.cpp @@ -71,17 +71,17 @@ using namespace netgen; -template <> int Ng_GetNElements<1> () +template <> int DLL_HEADER Ng_GetNElements<1> () { return mesh->GetNSeg(); } -template <> int Ng_GetNElements<2> () +template <> DLL_HEADER int Ng_GetNElements<2> () { return mesh->GetNSE(); } -template <> int Ng_GetNElements<3> () +template <> DLL_HEADER int Ng_GetNElements<3> () { return mesh->GetNE(); } @@ -89,7 +89,7 @@ template <> int Ng_GetNElements<3> () -template <> Ng_Element Ng_GetElement<1> (int nr) +template <> DLL_HEADER Ng_Element Ng_GetElement<1> (int nr) { const Segment & el = mesh->LineSegment (SegmentIndex(nr)); @@ -101,8 +101,7 @@ template <> Ng_Element Ng_GetElement<1> (int nr) return ret; } -template <> -Ng_Element Ng_GetElement<2> (int nr) +template <> DLL_HEADER Ng_Element Ng_GetElement<2> (int nr) { const Element2d & el = mesh->SurfaceElement (SurfaceElementIndex (nr)); @@ -113,8 +112,7 @@ Ng_Element Ng_GetElement<2> (int nr) return ret; } -template <> -Ng_Element Ng_GetElement<3> (int nr) +template <> DLL_HEADER Ng_Element Ng_GetElement<3> (int nr) { const Element & el = mesh->VolumeElement (ElementIndex (nr));