unsigned int const does not match const unsigned int

Discussion in 'C++' started by Timo Freiberger, Oct 30, 2004.

  1. Hi everybody,

    when I try to compile a program that uses image Magick++ lib, I get the following error:

    error: argument of type `unsigned int (Magick::Image::)()
    const' does not match `const unsigned int'


    here is the code:

    // new Image
    Image glyph(bitmap.width,bitmap.rows, "K", CharPixel, bitmap.buffer);
    // this leads to the error:
    unsigned int const c = buchstabe.columns;

    My first attempt was to use:

    PixelPacket *pixel_cache = glyph.getPixels(0,0,glyph.columns,glyph.rows);

    but then I get the error:

    error: no matching function for call to `Magick::Image::
    getPixels(int, int, <unknown type>, <unknown type>)'
    /usr/include/Magick++/Image.h:1134: error: candidates are:
    MagickLib::pixelPacket* Magick::Image::getPixels(int, int, unsigned int,
    unsigned int)


    Any help is very apreciated, because i'm stuck on this.

    Greetz
    Timo
    Timo Freiberger, Oct 30, 2004
    #1
    1. Advertising

  2. "Timo Freiberger" <> wrote in message
    news:p...

    > // new Image
    > Image glyph(bitmap.width,bitmap.rows, "K", CharPixel, bitmap.buffer);
    > // this leads to the error:
    > unsigned int const c = buchstabe.columns;


    It's hard to know without seeing your header files, but could you be
    neglecting to call a function?

    That is, could it be that you need to write something like this?

    unsigned int const c = buchstabe.columns();

    where the parentheses say to call the function?
    Andrew Koenig, Oct 30, 2004
    #2
    1. Advertising

  3. Timo Freiberger

    JKop Guest

    Andrew Koenig posted:

    > "Timo Freiberger" <> wrote in message
    > news:p...
    >
    >> // new Image
    >> Image glyph(bitmap.width,bitmap.rows, "K", CharPixel, bitmap.buffer);
    >> // this leads to the error: unsigned int const c = buchstabe.columns;

    >
    > It's hard to know without seeing your header files, but could you be
    > neglecting to call a function?
    >
    > That is, could it be that you need to write something like this?
    >
    > unsigned int const c = buchstabe.columns();
    >
    > where the parentheses say to call the function?




    This seems the likely cuplrit.

    The other (but unlikely) possiblity is that "columns" is a member
    variable which is a function pointer.


    -JKop
    JKop, Oct 30, 2004
    #3
  4. On Sat, 30 Oct 2004 16:37:29 +0200, Timo Freiberger <>
    wrote:

    >Hi everybody,
    >
    >when I try to compile a program that uses image Magick++ lib, I get the following error:
    >
    >error: argument of type `unsigned int (Magick::Image::)()
    > const' does not match `const unsigned int'
    >
    >
    >here is the code:
    >
    >// new Image
    >Image glyph(bitmap.width,bitmap.rows, "K", CharPixel, bitmap.buffer);
    >// this leads to the error:
    >unsigned int const c = buchstabe.columns;
    >
    >My first attempt was to use:
    >
    >PixelPacket *pixel_cache = glyph.getPixels(0,0,glyph.columns,glyph.rows);
    >
    >but then I get the error:
    >
    >error: no matching function for call to `Magick::Image::
    > getPixels(int, int, <unknown type>, <unknown type>)'

    ^^^^ ^^^^
    Just a guess ... try this:

    PixelPacket *pixel_cache =
    glyph.getPixels(0,0,glyph.columns(),glyph.rows());

    >/usr/include/Magick++/Image.h:1134: error: candidates are:
    > MagickLib::pixelPacket* Magick::Image::getPixels(int, int, unsigned int,
    > unsigned int)


    --
    Bob Hairgrove
    Bob Hairgrove, Oct 30, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page