Page 1 of 1

Linux link problem

Posted: 2008-08-12T05:27:08-07:00
by kustom
Hello,

I have just used MagickWand in my windows system and all is perfect, i just do the next to load the library:

HMODULE HM = LoadLibrary("CORE_RL_wand_.dll");

Simply it works, i can use all API of MagickWand...

Then? Which is my problem?
Well, now, i have to do the same in Linux (Ubuntu)....

I just prepared a Makefile to just add the static library ( on linux is libGraphicsMagickWand.a) to my code.

It simply doesnt work, i get next error messages:

Code: Select all

WrapWand.o: In function `InitializeWand':
WrapWand.c:(.text+0x5e): undefined reference to `MagickWandGenesis'
WrapWand.o: In function `FinalizeWand':
WrapWand.c:(.text+0x7f): undefined reference to `MagickWandTerminus'
WrapWand.o: In function `ImageAnnotate':
WrapWand.c:(.text+0x310): undefined reference to `MagickNewImage'
WrapWand.c:(.text+0x35c): undefined reference to `MagickSetImageFormat'
WrapWand.c:(.text+0x390): undefined reference to `MagickSetBackgroundColor'
WrapWand.c:(.text+0x3c7): undefined reference to `MagickSetFont'
WrapWand.c:(.text+0x4a6): undefined reference to `MagickSetOption'
WrapWand.c:(.text+0x5e5): undefined reference to `MagickSetOption'
WrapWand.c:(.text+0x607): undefined reference to `MagickSetOption'
WrapWand.c:(.text+0x792): undefined reference to `MagickSetOption'
WrapWand.c:(.text+0x7af): undefined reference to `MagickSetOption'
WrapWand.c:(.text+0x85b): undefined reference to `MagickSetImageFormat'
WrapWand.c:(.text+0x8d1): undefined reference to `MagickDistortImage'
collect2: ld devolvió el estado de salida 1


some one can help me? how can i use MagickWand in my Ubuntu???


thanks a lot of

kustom

Re: Linux link problem

Posted: 2008-08-12T11:50:46-07:00
by magick
> I just prepared a Makefile to just add the static library

See http://magick.imagemagick.org/script/magick-wand.php. It suggest you use this command:

cc `MagickWand-config --cflags --cppflags` wand.c `MagickWand-config --ldflags --libs`

For older versions of ImageMagick, use Wand-config instead of MagickWand-Config. If neither is available, install the latest ImageMagick and development RPMS.

Re: Linux link problem

Posted: 2008-08-13T02:24:51-07:00
by kustom
sorry for my ignorance, but im new on linux....

should i then include this line in my Makefile?

cc `MagickWand-config --cflags --cppflags` wand.c `MagickWand-config --ldflags --libs`

it will generate a static library?

thanks and sorry

kustom