What is Standard_Export

To whom may know: There is such declaration : Standard_EXPORT static void gpTest.... existing in the samples for MFC. The sample file is named SamplesGeometry. I don't know whether this declaration is specially focused on Open Cascade used or not. Does anybody can answer me or tell me why? Thank you very much.

Philippe Poncot's picture

Standard_EXPORT and Standard_IMPORT are OpenCascade define used to export methods or variable .

they were defined in order to use the same define on Windows and on Unix plate-formes.

You can see the real defintion in Standard_macros.hxx

RoadWarrior's picture

The file mentioned "Standard_macros.hxx" is no longer distributed. Can someone please explain further whay Standard_EXPORT is needed.

Patrik Müller's picture

For MFC users:

#if (!defined TK3DS_API)
#define TK3DS_API __declspec(dllexport)
#define TK3DS_API __declspec(dllimport)

"dllexport" is the same kind of macro than Standard_EXPORT.
You see "Standard_EXPORT" in header files for DLLs.
The OS needs such definitions for finding the classes/functions in DLLs.


Patrtik Müller

mbd's picture


Standard_Macro is still distributed but is in %CASROOT%/src/Standard/ ....