Skip to content

Commit 7e68b0e

Browse files
authored
Merge pull request #97 from jhlegarreta/AddSymbolExportExplanation
DOC: Add the symbol export documentation.
2 parents 9bd4f4e + e4e185f commit 7e68b0e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,6 +3102,25 @@ \section{Using Standard Macros}
31023102
to the [\code{min}, \code{max}] closed interval.
31033103
\end{itemize}
31043104
3105+
Furthermore, the ITK symbol visibility is governed by some macros using the
3106+
following rules:
3107+
\begin{itemize}
3108+
\item \code{\${ModuleName}\_EXPORT}: export for non-templated classes.
3109+
\item \code{ITK\_TEMPLATE\_EXPORT}: export for templated classes.
3110+
\item \code{ITK\_FORWARD\_EXPORT}: export for forward declarations.
3111+
\end{itemize}
3112+
3113+
This supports the all the combinations of:
3114+
\begin{itemize}
3115+
\item macOS, Linux and Windows operating systems,
3116+
\item the shared \code{BUILD\_SHARED\_LIBS} \code{ON} and \code{OFF} static
3117+
linking modes,
3118+
\item explicit and implicit template instantiation,
3119+
\item the CMake \code{CMAKE\_CXX\_VISIBILITY\_PRESET} flag set to hidden (i.e.
3120+
\code{-fvisibility=hidden}),
3121+
\item the CMake flag {CMAKE\_WINDOWS\_EXPORT\_ALL\_SYMBOLS:BOOL=ON}.
3122+
\end{itemize}
3123+
31053124
Please review this file and become familiar with these macros.
31063125
31073126
All classes must declare the basic macros for object creation and run-time type

0 commit comments

Comments
 (0)