From 3d53781ba62c4d27d5f022c9acef0b2b274df3c0 Mon Sep 17 00:00:00 2001 From: Bryce Denney Date: Wed, 16 Oct 2002 22:33:32 +0000 Subject: [PATCH] - for win32 dll, must export Widget class and array of Widget pointers --- bochs-testing/plugin-test/test8-execlass/main.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bochs-testing/plugin-test/test8-execlass/main.h b/bochs-testing/plugin-test/test8-execlass/main.h index c885863f6..915d69f66 100644 --- a/bochs-testing/plugin-test/test8-execlass/main.h +++ b/bochs-testing/plugin-test/test8-execlass/main.h @@ -2,22 +2,22 @@ # ifdef MAIN_DLL_EXPORT # ifdef DLL_EXPORT # warning I will export DLL symbols for MODULE1 -# define MAINAPI(type) __declspec(dllexport) type +# define MAINAPI __declspec(dllexport) # endif # else # warning I will import DLL symbols for MODULE1 -# define MAINAPI(type) __declspec(dllimport) type +# define MAINAPI __declspec(dllimport) # endif #endif #ifndef MAINAPI # warning No DLL import/export is needed -# define MAINAPI(type) type +# define MAINAPI #endif typedef void (*modload_func)(void); -MAINAPI(extern const char *) version_string; -MAINAPI(extern int) register_module (const char *name); +MAINAPI extern const char * version_string; +MAINAPI extern int register_module (const char *name); // really, this should only be included in the modules. It would be // incorrect to call module_init from main, even if the compiler allowed @@ -27,7 +27,7 @@ extern "C" { void module_init (); }; -class Widget { +class MAINAPI Widget { int id; const char *name; float weight; @@ -40,4 +40,4 @@ public: }; #define MAX_WIDGETS 10 -extern Widget* widgets[MAX_WIDGETS]; +MAINAPI extern Widget* widgets[MAX_WIDGETS];