adamdebreceni commented on a change in pull request #1138:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1138#discussion_r680720629



##########
File path: libminifi/include/utils/Export.h
##########
@@ -15,14 +15,21 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "TemplateLoader.h"
-#include "core/FlowConfiguration.h"
 
-bool TemplateFactory::added = 
core::FlowConfiguration::add_static_func("createTemplateFactory");
+#pragma once
 
-extern "C" {
-
-void *createTemplateFactory(void) {
-  return new TemplateFactory();
-}
-}
+#ifdef WIN32
+  #ifdef LIBMINIFI
+    #define MINIFIAPI __declspec(dllexport)
+  #else
+    #define MINIFIAPI __declspec(dllimport)
+  #endif
+  #ifdef MODULE_NAME
+    #define EXTENSIONAPI __declspec(dllexport)
+  #else
+    #define EXTENSIONAPI __declspec(dllimport)
+  #endif
+#else
+  #define MINIFIAPI
+  #define EXTENSIONAPI
+#endif

Review comment:
       agree that sharing export macros is suboptimal, possibly in a separate 
PR, now WINDOWS_EXPORT_ALL_SYMBOLS does most of the heavy lifting, moving to 
manually annotating all classes and static members (mostly for the sake of 
tests) is a significant effort




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to