[Insight-users] Re: ITK Wrappers and gcc_xml

Charl P. Botha cpbotha at cpbotha.net
Thu Feb 16 15:18:58 EST 2006


Hi there Brad,

On 2/16/06, Brad King <brad.king at kitware.com> wrote:
> Zachary Pincus wrote:
> > While gcc_xml "sees" the __stdcall (and provides a __stdcall__
> > attribute; no idea why the trailing underscores), CableSwig doesn't  do
> > anything with that attribute.
> >
> > Thus, CablsSwig generates code that assumes that ThreadFunctionType  is
> > "unsigned long (*)(void*)". But VC++ defaults to declaring  functions
> > __cdecl if there isn't any call type. So VC++ sees the   typedef as
> > "unsigned long (__cdecl *)(void*)". Since __cdecl  functions are
> > incompatible with __stdcall functions, the compile breaks.
>
> Nice, thanks for tracking that down.  FYI, the trailing underscores show
> up because __stdcall is not known to GCC so the preprocessor transforms
> it to __attribute__((__stdcall__)) or something like that which is the
> attribute that tells GCC to use the __stdcall calling convention (on
> MinGW for example).

Does this mean that you'll be able to adapt CableSwig so that it'll be
able to handle this situation without human intervention? (i.e.
hand-editing CableSwig generated C++ :)

Thanks,
Charl


More information about the Insight-users mailing list