Image(string) link issue

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
shooter6947
Posts: 1
Joined: 2014-10-23T09:46:32-07:00
Authentication code: 6789

Image(string) link issue

Post by shooter6947 » 2014-10-23T09:55:35-07:00

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

Post Reply