Help using GM with CMake
Scott Harvey <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
Hi all. First post. I'm exhausted. I'm working on a project where I'll be working with several hundred images (desktop wallpaper) and I want to write a GUI application for a user to remix and modify them. But right now, I want to use GraphicsMagick (I gave up on ImageMagick) to run a batch resize on all my images so I have a handy cache of thumbnails - there's about 800 images. The apps are being written in C++ (11, I believe). I'm a KDE developer, so I'll be using the KDE and Qt Frameworks - both of which are C++. I can't use the traditional method of asking CMake to "find_package" for GraphicsMagick - doesn't appear to provide one. If I forcibly add the directory (/usr/include/GraphicsMagick), my project will finally find "Magick++.h". But then, in the simplest possible program (trying to open and re-save a file), the compiler throws the following errors: (The file in question is named "gaussian.cpp" because I have plans to blur the images... but I'm still trying to start!) --- CMakeFiles/gaussian.dir/gaussian.cpp.o: In function `main': gaussian.cpp:(.text+0x27): undefined reference to `Magick::InitializeMagick(char const*)' gaussian.cpp:(.text+0x5b): undefined reference to `Magick::Image::Image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' gaussian.cpp:(.text+0xa7): undefined reference to `Magick::Image::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' gaussian.cpp:(.text+0xcb): undefined reference to `Magick::Image::~Image()' gaussian.cpp:(.text+0x129): undefined reference to `Magick::Image::~Image()' --- Can someone help me? Between IM and GM, I've been at this for almost 24 hours. My system is openSUSE Tumbleweed and is in otherwise working condition. If it matters, I've installed GM from the openSUSE package manager rather than install from source. Thanks in advance for the help. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot