Page 1 of 1

const keyword in Magick::Options::fontStyle declation

Posted: 2016-02-09T07:34:05-07:00
by mito
The two methods Magick::Options::fontStyle and Magick::Options::fontWeight use the const keyword for their parameters in the declarations (but not in the implementation). This was introduced here
http://git.imagemagick.org/repos/ImageM ... fca#diff-3
and it causes the following link error on Solaris (using the Sun Studio compiler):

Code: Select all

Undefined			first referenced
 symbol  			    in file
void Magick::Options::fontStyle(const MagickCore::StyleType) Magick++/lib/.libs/Magick___lib_libMagick___6_Q16_la-Image.o
void Magick::Options::fontWeight(const unsigned) Magick++/lib/.libs/Magick___lib_libMagick___6_Q16_la-Image.o
Shouldn't the two consts in the declarations in Magick++/lib/Magick++/Options.h simply be removed?

Regards,
Michael

Re: const keyword in Magick::Options::fontStyle declation

Posted: 2016-02-09T12:34:57-07:00
by dlemstra
Thanks for alerting us to this problem. I just pushed a patch to our GIT repository to add the missing consts.