[magick-users] A newbie question about magick++

夜弓 yegong1985 at gmail.com
Mon Apr 30 09:56:49 PDT 2007


i'm just a newbie both in ImageMagick and gcc, and now, in trouble.
I just write a hello-world program like this
>>Image image;
>>image.read( "girl.gif" );
and include the correct header file. i think it is too simple to
contain any errors.
but when I compile it, the thing's going wrong.

if i link it with a static lib
>>g++ main.cpp -L/usr/local/lib -lMagick++ -static
the response of gcc is many link errors like this,
>>Magick++/lib/Drawable.cpp:336: undefined reference to `DrawPushClipPath'
>>/usr/local/lib/libMagick++.a(Drawable.o): In function
>>`Magick::DrawableFont::operator()(MagickLib::_DrawingWand*) const':

if i link it with dynamic lib
>>g++ main.cpp -L/usr/local/lib -lMagick++
it can be linked correctly. but running it just get this message:
>>"error while loading shared libraries: libMagick++.so.10: cannot
open shared object file: No such file or directory"
but i am sure that libMagick++.so.10 is in the /usr/local/lib

after a few hours' trying, i still have no clue. thanks if any help or reply.

-- 
Cooper
School of Ocean & Earth Sci.
Tongji University, PR China


More information about the Magick-users mailing list