]> git.tdb.fi Git - builder.git/blobdiff - plugins/msvc/msvcplugin.cpp
Add visibility decorations to the library and plugins
[builder.git] / plugins / msvc / msvcplugin.cpp
index 9ebf24a5f517809894bdfc81a09c038983fbc1c1..bf1e26e3ba33990f560a6aa1ea7caa3f3f755785 100644 (file)
@@ -23,8 +23,16 @@ void MsvcPlugin::create_targets(SourcePackage &spkg) const
 }
 
 
+#if defined(_WIN32)
+#define MSVCTOOLS_API __declspec(dllexport)
+#elif defined(__GNUC__)
+#define MSVCTOOLS_API __attribute__((visibility("default")))
+#else
+#define MSVCTOOLS_API
+#endif
+
 extern "C"
-Plugin *create_plugin(Builder &builder)
+MSVCTOOLS_API Plugin *create_plugin(Builder &builder)
 {
        return new MsvcPlugin(builder);
 }