1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifndef FOO_H #define FOO_H #include <dllexport.h> #ifdef FOO_LIB_STATIC #define FOO_LIB_EXPORT #else #ifdef FOO_LIB #define FOO_LIB_EXPORT DLL_EXPORT #else #define FOO_LIB_EXPORT DLL_IMPORT #endif #endif FOO_LIB_EXPORT int someFooWork(); #endif // FOO_H