Page 1 of 1

[SOLVED] Upgrading to 6.7.6-5 link errors

Posted: 2012-04-14T08:42:39-07:00
by shumifan50
After uppgrading from a previous version of Magick++ to 6.7.6-5 the instantiation of Geometry failed with a missing reference. This caused me to spend a lot of time trying to see why the libraries are ot linking properly. The problem was further aggravated by Ubuntu 11.10 using the new g++ linker requirements (see elsewhere) requiring much more strict inclusion of libraries and library sequencing.

It finally turned out to be a mixup of the previous version's header files with the new version of the library.
The definition of

Code: Select all

Geometry(unsigned int, unsigned int, unsigned int, unsigned int, bool, bool)
had changed to

Code: Select all

Geometry(unsigned int, unsigned int, signed int, signed int, bool, bool)
so with the C++ name mangling it was not found.

This is merely a post to try and help somebody in the furture. It seems all the other prototypes remained the same, but for good measure make sure your headers match your libraries when you get linking errors="undefined reference to <something>".

You can also use "nm -C libMagick++.so" to see what is available in the library.