Linux link problem

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
kustom

Linux link problem

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Linux link problem

Post 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.
kustom

Re: Linux link problem

Post 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
Post Reply