I am trying to get the exif data from a jpeg image file using the Magick++ attribute approach but I get link errors LNK2028 and LNK2019 for the image object instance attribute. The environment is Visual Studio Community Edition 2017. The version of ImageMagick is 6.9.3-7 compiled with the Magick++ headers. The operating system is Windows 10. I get the same issue when trying to use the latest Windows version of Image Magick similarly compiled.
The exif data are there via the Windows command line indentify -verbose filename.
The Magick++ methods that I am using such as read, quality, resize and write all link and work fine but the attribute does not - (standard string) extracted_data = image.attribute("exif:DateTime"); gives the link errors.
Any advice will be most appreciated and thanking you in anticipation.
Magick++ attribute will not link
Re: Magick++ attribute will not link
Further information: On a separate Windows 7 PC the identical C++ code compiles, links and executes perfectly. On that PC the IDE is Visual Studio 2010 Express with ImageMagick 6.8.6.
Re: Magick++ attribute will not link
The issue turned out to be due to conflicting versions of ImageMagick on the one PC. And make sure that MAGICK_CORE is set correctly in the environment variables. Once I had that sorted out the program compiled, linked and executed OK.