I installed Magick++ via the YaST software installer, and everything looked good - I have libMagick.a and various .so files etc. tucked away in usr/lib64
So, I added a coulpe of lines of code to test the Magick++, and am confronted with errors like this:
Code: Select all
(.text+0x79f): undefined reference to `AcquireImagePixels'
/usr/lib64/libMagick++.a(Image.o): In function `Magick::Image::getConstPixels(int, int, unsigned int, unsigned int) const':
(.text+0x7b2): undefined reference to `DestroyExceptionInfo'
/usr/lib64/libMagick++.a(Image.o): In function `Magick::Image::type() const':
Code: Select all
rec: hardware/rec.c audio_utils.o utils.o
g++ $(FLAGS) -I. $(HARDWARE_INCLUDE) hardware/rec.c /usr/lib64/libMagick++.a audio_utils.o utils.o $(HARDWARE_LIB) -lpthread -o rec
Edit: Eventually changed the Makefile line to read as follows:
Code: Select all
rec: hardware/rec.c audio_utils.o utils.o
g++ $(FLAGS) -I. $(HARDWARE_INCLUDE) `Magick++-config --cxxflags --cppflags --ldflags --libs` hardware/rec.c /usr/lib64/libMagick++.a audio_utils.o utils.o $(HARDWARE_LIB) -lpthread -o record
Code: Select all
Image Mimage();
Mimage.read("testout.png");
Code: Select all
hardware/rec.c:122: error: expected constructor, destructor, or type conversion before ‘.’ token