const keyword in Magick::Options::fontStyle declation

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
mito
Posts: 1
Joined: 2016-02-09T07:25:06-07:00
Authentication code: 1151

const keyword in Magick::Options::fontStyle declation

Post 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
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post by dlemstra »

Thanks for alerting us to this problem. I just pushed a patch to our GIT repository to add the missing consts.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply