Page 1 of 1

unable to get magick++ work

Posted: 2011-05-23T04:46:04-07:00
by sw-dev
i want to include imagemagick's magick++ library in my project

but after including the header files
i am getting the error when i just declare an Image object
Image image;

simple.cpp:(.text+0x14c): undefined reference to `Magick::Image::Image()'
simple.cpp:(.text+0x268): undefined reference to `Magick::Image::~Image()'

thnks

Re: unable to get magick++ work

Posted: 2011-05-23T05:15:10-07:00
by magick
Windows or Linux? Under Linux did you compile your source like this?
  • c++ `Magick++-config --cxxflags --cppflags` -O2 -o simple simple.cpp \
    `Magick++-config --ldflags --libs`
Under Windows, go to c:\Program Files\ImageMagick-6.6.9-10\Magick++_demo and build and run the button workspace. Now use the button workspace as a template for your own project.

Re: unable to get magick++ work

Posted: 2011-05-23T05:45:49-07:00
by sw-dev
linux .. i have to use this library for webos painting app development ...
do i need to install imagemagick.exe on webos mobile also ? if so ,how will i install imagemagick it on the mobile device ... plam webos has linux os..
and when i am using this commad

set SRC=plugin\simple.cpp
set OUTFILE=simple
arm-none-linux-gnueabi-gcc `Magick++-config --cxxflags --cppflags` %DEVICEOPTS% -o %OUTFILE% %SRC% "-I%PALMPDK%\include" "-I%PALMPDK%\include\SDL" "-L%PALMPDK%\device\lib" `Magick++-config --ldflags --libs` -Wl,--allow-shlib-undefined %LIBS%
it says


arm-none-linux-gnueabi-gcc: `Magick++-config: No such file or directory
arm-none-linux-gnueabi-gcc: `Magick++-config: No such file or directory
cc1plus.exe: error: unrecognized command line option "-fcxxflags"
cc1plus.exe: error: unrecognized command line option "-fcppflags`"
cc1plus.exe: error: unrecognized command line option "-fldflags"
cc1plus.exe: error: unrecognized command line option "-flibs`"