C ++: explanation of macro extension

I read the C ++ header file, which writes:

 class CLASSEXPORT skExecutable : {.....}

The comment says that CLASSEXPORT is a macro extension, and then I find where CLASSEXPORT is defined.

 #define CLASSEXPORT

And that’s all ... I am confused by this. What is CLASSEXPORT in this sense? And how to understand the skExecutable class?

+4
source share
2 answers

CLASSEXPORT (, , - ), class skExecutable {<...>};. /, . , COMPILING_DLL:

#if COMPILING_DLL
    #define DLLEXPORT __declspec(dllexport)
#else
    #define DLLEXPORT __declspec(dllimport)
#endif

class DLLEXPORT MyClass
{
};
+3

: CLASSEXPORT - . - - , , , .

, CLASSEXPORT , , - , . CLASSEXPORT

#define CLASSEXPORT __declspec(dllexport) 

skExecutable .

+1

Source: https://habr.com/ru/post/1612906/


All Articles