[Insight-developers] ITK_EXPORT
Luis Ibanez
ibanez@choroid.cs.unc.edu
Wed, 2 May 2001 10:57:32 -0400 (EDT)
It seems to be important to add the ITK_EXPORT
symbol to every class that derives from one that
already uses this symbol.
Otherwise, VC++ creates duplicate versions of
some functions with a different calling convention.
This is not noted in the test files given that they
usualy are very short.
On the Examples, the applications use a higher number
of classes, and conflicts are more likely to occurr.
That results in runtime errors detected when checking
the stack. The message in VC++ is:
"The value of ESP was not properly saved across a function call.
This is usually a result of calling a function declared with one
calling convention with a function pointer declared with a
different calling convention"
Luis