From a5bd24845a2720d57a66d81effc59423d723c87c Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Tue, 5 May 2015 19:23:45 -0400 Subject: ICE-6481 pragma comment when building static libraries On windows with VS, pragma comment is now defined when building only when ICE_BUILDING_ is not defined. ICE_BUILDING_ is defined automatically when _API_EXPORTS is defined. When building static Ice libraries on Windows, please define ICE_BUILDING_. ICE_DECLSPEC_EXPORT and ICE_DECLSPEC_IMPORT are now defined all the time on Windows, and we define the various _API macros to /**/ when ICE_STATIC_LIBS is defined. Replaced various direct use of ICE_DECLSPEC_EXPORT/ICE_DECLSPEC_IMPORT by the correct _API macro. --- cpp/src/Slice/CPlusPlusUtil.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp') diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 95b34a2ec66..e50b4908eab 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -441,6 +441,8 @@ Slice::printDllExportStuff(Output& out, const string& dllExport) out << "\n#ifndef " << dllExport; out << "\n# ifdef " << dllExport << "_EXPORTS"; out << "\n# define " << dllExport << " ICE_DECLSPEC_EXPORT"; + out << "\n# elif defined(ICE_STATIC_LIBS)"; + out << "\n# define " << dllExport << " /**/"; out << "\n# else"; out << "\n# define " << dllExport << " ICE_DECLSPEC_IMPORT"; out << "\n# endif"; -- cgit v1.2.3