 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Timo Freiberger Guest
|
Posted: Sat Oct 30, 2004 2:37 pm Post subject: unsigned int const does not match const unsigned int |
|
|
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
|
|
| Back to top |
|
 |
Andrew Koenig Guest
|
Posted: Sat Oct 30, 2004 2:51 pm Post subject: Re: unsigned int const does not match const unsigned int |
|
|
"Timo Freiberger" <teamoe (AT) gmx (DOT) de> wrote
| Quote: | // 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?
|
|
| Back to top |
|
 |
JKop Guest
|
Posted: Sat Oct 30, 2004 4:31 pm Post subject: Re: unsigned int const does not match const unsigned int |
|
|
Andrew Koenig posted:
| Quote: | "Timo Freiberger" <teamoe (AT) gmx (DOT) de> wrote in message
news:pan.2004.10.30.14.37.23.422455 (AT) gmx (DOT) de...
// 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
|
|
| Back to top |
|
 |
Bob Hairgrove Guest
|
Posted: Sat Oct 30, 2004 7:02 pm Post subject: Re: unsigned int const does not match const unsigned int |
|
|
On Sat, 30 Oct 2004 16:37:29 +0200, Timo Freiberger <teamoe (AT) gmx (DOT) de>
wrote:
| Quote: | 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());
| Quote: | /usr/include/Magick++/Image.h:1134: error: candidates are:
MagickLib::PixelPacket* Magick::Image::getPixels(int, int, unsigned int,
unsigned int)
|
--
Bob Hairgrove
[email]NoSpamPlease (AT) Home (DOT) com[/email]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|