//============================================================================= // drt/sys/slib1.hpp // Definitions for Win32 dynamic shared library (DLL) gibberish. // // Usage // This file should be #included by each header file. // It follows all other #includes and forward declarations but precedes // any class declarations. // The end of each header file should #include the companion header file // "slib2.hpp". // // Example // //======================================================== // // foo.hpp // //-------------------------------------------------------- // // // System includes // #include // // // Special includes // #include "sdefs.hpp" // // // Local includes // #include "local.hpp" // // // Forward declarations // class Bar; //#include "bar.hpp" // // // Local wrappers // #include "slib1.hpp" <- This header goes here // drt_namespace_begin // // ...remaining contents of "foo.hpp"... // // class Foo DRTEXPORT { ... }; // class Bar DRTEXPORT { ... }; // // extern int DRTFUNC func(); // // ...no more declarations beyond this point... // // #include "slib2.hpp" <- Companion header goes here // drt_namespace_end // // // End foo.hpp // // History // 0.01, 1998-03-28, David R Tribble. // First cut. // // 0.02, 1998-04-24, David R Tribble. // Renamed from "scmlib1.h" to "jlib1.h". // // 0.03, 1998-05-30, David R Tribble. // Changed filename prefix from "j" to "k". // // 0.04, 1999-02-21, David R Tribble. // Moved from scm/ to drt/sys/. // // 1.00, 1999-07-31, David R Tribble. // Renamed 'DRTDECL' to 'DRTEXPORT' and 'DRTCALL' to 'DRTFUNC'. // // Copyright ©1998-1999, by David R. Tribble, all rights reserved. // See "drt/sys/copyr.txt" for more information. //----------------------------------------------------------------------------- // Note: This file needs no wrapper macro #define drt_sys_slib1_hpp 100 // Verify include order #ifndef drt_sys_sdefs_hpp #error Include "sys/sdefs.hpp" before this header #endif #ifndef __cplusplus #error Use "klib1.h" instead of "slib1.hpp" for C #endif // Win32 DLL gibberish #undef DRTFUNC #undef DRTEXPORT #if DRT_OS_WIN32 and defined(_DLL) #define DRTFUNC __cdecl #ifdef vdiff_lib #define DRTEXPORT __declspec(dllexport) #else #define DRTEXPORT __declspec(dllimport) #endif #else #define DRTFUNC #define DRTEXPORT #endif // End slib1.hpp