[cable] Compiler errors

Brad King brad.king at kitware.com
Wed Apr 2 13:30:55 EST 2003


> I don't know if this is the right question to ask, or if this reveals my
> non-understanding of parts of C++, but VisualC++ refuses to compile the
> cable-generated File at points where procedures are wrapped with
> arguments of the type "void *someData"  with the comment/error:
>
> error C2664: 'class OFCondition __thiscall
> DVPresentationState::getPixelData(void *,unsigned long)' : cannot
> convert parameter 1 from 'const void *' to 'void *'
> Conversion loses qualifiers
>
> Original Procedure:
> OFCondition DVPresentationState::getPixelData(
>      void *pixelData,
>      unsigned long size)
>
> generated wrapper _tcl.cxx:
> /**
>  * OFCondition DVPresentationState::getPixelData(void*, unsigned long)
>  */
> void
> Wrapper< DVPresentationState >
> ::Method_123_getPixelData(const WrapperFacility* wrapperFacility, const
> Arguments& arguments)
> {
>   DVPresentationState& instance = ArgumentAsReferenceTo<
> DVPresentationState >(wrapperFacility)(arguments[0]);
>   Return< OFCondition >::From(
>   instance.getPixelData(
> [%%]    CvType< void* >::ArgumentFor(wrapperFacility)(arguments[1]),
>     CvType< unsigned long
>  >::ArgumentFor(wrapperFacility)(arguments[2])), wrapperFacility);
> }

I'm afraid I cannot duplicate your problem.  Please try to construct a
small example class with a method that duplicates this problem when
wrapped.

Thanks,
-Brad





More information about the cable mailing list