]> granicus.if.org Git - graphviz/commitdiff
Visio plugin: fix use of dllimport
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 7 Apr 2022 01:32:13 +0000 (18:32 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 11 Apr 2022 01:00:53 +0000 (18:00 -0700)
When enabling this plugin in the CMake build, the compiler complains:

  …\plugin\visio\gvplugin_visio.c(30,69): error C2491:
    'gvplugin_visio_LTX_library': definition of dllimport data not allowed

Gitlab: #1836

plugin/visio/gvplugin_visio.c

index cbb17097f0b32140a7c453db43b473085385963c..6a024155753fc66497a020acfacfd416adc0a717 100644 (file)
@@ -26,11 +26,6 @@ static gvplugin_api_t apis[] = {
 };
 
 #ifdef GVDLL
-#ifndef GVPLUGIN_VISIO_EXPORTS
-__declspec(dllimport) gvplugin_library_t gvplugin_visio_LTX_library = { "visio", apis };
-#else
-__declspec(dllexport) gvplugin_library_t gvplugin_visio_LTX_library = { "visio", apis };
+__declspec(dllexport)
 #endif
-#else
 gvplugin_library_t gvplugin_visio_LTX_library = { "visio", apis };
-#endif