Page 1 of 1

Image(string) link issue

Posted: 2014-10-23T09:55:35-07:00
by shooter6947
I'm having an issue when linking Magick++ code with g++ 4.7.4 on FreeBSD 10.1. The link step complains:
undefined reference to `Magick::Image::Image(std::string const&)'
when I try to instantiate an Image with a filename. Here's the trivial code snippet that generates this error:

Code: Select all

#include "Magick++.h"

main()
{
	Magick::Image im("test.jpg");
}
I'm compiling it with the statement:
g++ -o ~/bin/IMissue IMissue.c++ `Magick++-config --cppflags --libs`
I get similar errors when I try to use Image::write(std::string const&). But everything else works just fine; it's just these two commands for writing and reading files from std::string that are giving me issues. I'd be grateful for any insights that people might have into my predicament. This all ran just fine with g++ 4.2.1 on FreeBSD 9.1 . . .

- Jason W. Barnes