Crosscompiling and Library error

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
hscho
Posts: 8
Joined: 2015-10-14T00:20:06-07:00
Authentication code: 1151

Crosscompiling and Library error

Post by hscho » 2015-10-28T01:40:06-07:00

I successfully cross compiled the whole ImageMagick for an ARM processor with my Linaro GCC Toolchain. Now I'm trying to compile the wand.c code from the /api_examples but I couldn't get the linker to work...

Code: Select all

arm-linux-gnueabihf-gcc -Wall -I./ -LMagickCore/.libs -LMagickWand/.libs -lMagickWand -lMagickCore -o api_examples/wand api_examples/wand.c 
I get:

Code: Select all

/usr/bin/ld: cannot find -lMagickWand
/usr/bin/ld: cannot find -lMagickCore
collect2: error: ld returned 1 exit status
when I watch inside the .libs folders the names are libMagickWand-7.Q16HDRI.so for example. so I tried to compile with

Code: Select all

arm-linux-gnueabihf-gcc -Wall -I./ -LMagickCore/.libs -LMagickWand/.libs -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI -o api_examples/wand api_examples/wand.c
i get:

Code: Select all

/tmp/cc2mGLl9.o: In function `ThrowWandException':
wand.c:(.text+0x1b): undefined reference to `MagickGetException'
wand.c:(.text+0x5b): undefined reference to `MagickRelinquishMemory'
/tmp/cc2mGLl9.o: In function `main':
wand.c:(.text+0x75): undefined reference to `MagickWandGenesis'
wand.c:(.text+0x7a): undefined reference to `NewMagickWand'
wand.c:(.text+0x94): undefined reference to `MagickSetSize'
wand.c:(.text+0xa5): undefined reference to `MagickReadImage'
wand.c:(.text+0xbf): undefined reference to `NewMagickWand'
wand.c:(.text+0xd4): undefined reference to `MagickReadImage'
wand.c:(.text+0xee): undefined reference to `NewPixelWand'
wand.c:(.text+0x103): undefined reference to `PixelSetColor'
wand.c:(.text+0x129): undefined reference to `MagickRotateImage'
wand.c:(.text+0x14a): undefined reference to `DestroyPixelWand'
wand.c:(.text+0x15a): undefined reference to `MagickSetLastIterator'
wand.c:(.text+0x16d): undefined reference to `MagickAddImage'
wand.c:(.text+0x179): undefined reference to `DestroyMagickWand'
wand.c:(.text+0x189): undefined reference to `MagickSetFirstIterator'
wand.c:(.text+0x19a): undefined reference to `MagickAppendImages'
wand.c:(.text+0x1aa): undefined reference to `DestroyMagickWand'
wand.c:(.text+0x1bf): undefined reference to `MagickWriteImage'
wand.c:(.text+0x1e0): undefined reference to `DestroyMagickWand'
wand.c:(.text+0x1e9): undefined reference to `MagickWandTerminus'
collect2: error: ld returned 1 exit status

Post Reply