Page 1 of 1

Problem with STL annotateImage()

Posted: 2007-09-20T01:58:32-07:00
by CoolSpot
Hi all!

This simple code does not work:

Code: Select all

for_each(imageList.begin(),imageList.end(),annotateImage("test", Geometry(10,10)));
My g++ compiler says:
line.cpp: In member function `void Line::RenderLine()':
/usr/local/include/Magick++/STL.h:118: error: `Magick::annotateImage::annotateImage(const Magick::annotateImage&)' is private
line.cpp:232: error: within this context
/usr/local/include/Magick++/STL.h:118: error: `Magick::annotateImage::annotateImage(const Magick::annotateImage&)' is private
line.cpp:232: error: within this context
line.cpp:232: error: initializing argument 3 of `_Function std::for_each(_InputIterator, _InputIterator, _Function) [with _InputIterator = std::_List_iterator<Magick::Image>, _Function = Magick::annotateImage]'
/usr/include/c++/3.4/bits/stl_algo.h: In function `_Function std::for_each(_InputIterator, _InputIterator, _Function) [with _InputIterator = std::_List_iterator<Magick::Image>, _Function = Magick::annotateImage]':
line.cpp:232: instantiated from here
/usr/local/include/Magick++/STL.h:118: error: `Magick::annotateImage::annotateImage(const Magick::annotateImage&)' is private
/usr/include/c++/3.4/bits/stl_algo.h:159: error: within this context
Please help!

Re: Problem with STL annotateImage()

Posted: 2007-09-24T19:11:11-07:00
by anthony
I don't know much C++, but that code does not look right.
You have the action inside the loop construct, and you don't seem to have any image increment.

that is before anything like checking the API handling, whicj I can't tell you about for Magick++