[cable] Compiler errors

Bertram Herzog bertram at bwh.harvard.edu
Tue Apr 1 13:00:45 EST 2003


Hello together-

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);
}

The error occurs everytime when the "void *someData" argument occurs. 
The error is risen at the [%%]-marked line.

Thanks for replies,
   Bertram





More information about the cable mailing list