[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Declspec Macro Example
The following is some code demonstrating how I’ve seen
Microsoft declspec handling for classes and functions in the past. The
definitions usually occur in a separate header. #if LIB_BUILD # define DECLSPEC __declspec(dllimport) # define DECLSPEC_FUNC(ReturnType) __declspec(dllimport)
ReturnType #else # define DECLSPEC __declspec(dllexport) # define DECLSPEC_FUNC(ReturnType) __declspec(dllexport)
ReturnType #endif class DECLSPEC Foo { Foo(); }; DECLSPEC_FUNC(int) fooFunc(void) {} |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]