diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-11-14 19:44:16 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-11-14 19:44:16 (GMT) |
commit | 0625007cb86815b2e30138183d4fe9d2e7850df9 (patch) | |
tree | 181f9ebfd0706ecca5898b169bffa8bc4f5486cc /doc/preprocessing.doc | |
parent | 670c8a436d6324a5ffb991f779cae0bc955959f7 (diff) | |
download | Doxygen-0625007cb86815b2e30138183d4fe9d2e7850df9.zip Doxygen-0625007cb86815b2e30138183d4fe9d2e7850df9.tar.gz Doxygen-0625007cb86815b2e30138183d4fe9d2e7850df9.tar.bz2 |
Release-1.3.9.1-20041114
Diffstat (limited to 'doc/preprocessing.doc')
-rw-r--r-- | doc/preprocessing.doc | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/doc/preprocessing.doc b/doc/preprocessing.doc index bce601a..883f8d2 100644 --- a/doc/preprocessing.doc +++ b/doc/preprocessing.doc @@ -74,8 +74,30 @@ and specify the macro definitions after the \ref cfg_predefined "PREDEFINED" or \ref cfg_expand_as_defined "EXPAND_AS_DEFINED" tag. -As an example, suppose you have the following obfuscated code fragment -of an abstract base class called \c IUnknown: +A typically example where some help from the preprocessor is needed is +when dealing with Microsoft's __declspec language extension. Here is an +example function. + +\verbatim +extern "C" void __declspec(dllexport) ErrorMsg( String aMessage,...); +\endverbatim + +When nothing is done, doxygen will be confused and see __declspec as +some sort of function. To help doxygen one typically uses the following +preprocessor settings: + +\verbatim +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +PREDEFINED = __declspec(x)= +\endverbatim + +This will make sure the __declspec(dllexport) is removed before doxygen +parses the source code. + +For a more complex example, suppose you have the following obfuscated +code fragment of an abstract base class called \c IUnknown: \verbatim /*! A reference to an IID */ |