Google
 

4/12/07

using magick++

c++ -o example example.cpp `Magick++-config --cppflags --cxxflags --ldflags --libs`


Now I want to use kdevelop as my IDE and use Qmake. How to use magick++ library now?
1. in a console type:
>
Magick++-config --cppflags --cxxflags --ldflags --libs

-I/usr/include
-pthread
-L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -L/usr/lib
-lMagick++ -lWand -lMagick -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -lpthread

The above is the output.
So in the src. pro file, add the following:

INCLUDEPATH += /usr/include /usr/include/magick

LIBS = -lfreetype -lz -lMagick++ -lWand -lMagick -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -lpthread


Now recompile the project. It should work.