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?".
reimer
Post
by reimer » 2008-08-29T06:08:00-07:00
During the linking process I get an "undefined symbols" error message.
Code: Select all
g++ Demo.cpp -lMagick++
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
_CloneImageInfo
_DestroyExceptionInfo
_DestroyImageInfo
_GetExceptionInfo
_ReadImage
collect2: ld returned 1 exit status
Here is the demo code:
Code: Select all
#include <Magick++.h>
#include <list>
using namespace std;
using namespace Magick;
int main(int argc,char **argv)
{
list<Image> imageList;
readImages( &imageList, "test_image_anim.gif" );
Image appended;
appendImages( &appended, imageList.begin(), imageList.end() );
appended.write( "appended_image.miff" );
return 0;
}
What am I doing wrong?
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2008-08-29T06:09:06-07:00
Add -lMagickWand -lMagickCore to your command line.
reimer
Post
by reimer » 2008-08-29T06:41:38-07:00
Thanks so far. MagickWand seems to not be installed. ImageMagick was installed by ports.
MagickWand can't be located. It should be installed with ImageMagick, shouldn't it?
Edit: both libraries cannot be found.
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2008-08-29T06:57:24-07:00
The traditional way of compiling an example is this:
g++ `Magick++-config --cflags --cppflags` -o magick++ magick++.cpp `Magick++-config --ldflags --libs`
Does that work for you?
MagickWand is generally installed whenever MagickCore is installed.
reimer
Post
by reimer » 2008-08-29T07:33:32-07:00
tiff cannot be located, but there are
/usr/local/lib/ImageMagick-6.3.3/modules-Q16/coders/tiff.la
/usr/local/lib/ImageMagick-6.3.3/modules-Q16/coders/tiff.so
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2008-08-29T08:40:11-07:00
Type
convert -debug configure,module logo: image.tif
It will tell you where it is looking to find the TIFF coder. Perhaps you have a permissions problem.
reimer
Post
by reimer » 2008-09-01T08:37:09-07:00
Here is what I get with "convert -debug configure,module logo: image.tif"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.000u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/usr/local/lib/ImageMagick-6.3.3/config/coder.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.010u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/usr/local/share/ImageMagick-6.3.3/config/coder.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.010u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/usr/local/share/doc/ImageMagick-6.3.3/coder.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.010u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/usr/local/share/ImageMagick-6.3.3/coder.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.010u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/Users/romain/.magick/coder.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.010u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "coder.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.010u 6.3.3 Configure convert[993]: coder.c/unknown/613/Configure
Loading coder map "/usr/local/share/ImageMagick-6.3.3/config/coder.xml" ...
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.020u 6.3.3 Module convert[993]: module.c/unknown/1065/Module
Searching for module "MAGICK" using filename "magick.la"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.020u 6.3.3 Module convert[993]: module.c/unknown/582/Module
Searching for coder module file "magick.la" ...
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.020u 6.3.3 Module convert[993]: module.c/unknown/1085/Module
Opening module at path "/usr/local/lib/ImageMagick-6.3.3/modules-Q16/coders/magick.la"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.020u 6.3.3 Module convert[993]: module.c/unknown/1120/Module
Method "RegisterMAGICKImage" in module "MAGICK" at address 0x7b1909
Warning: recursive semaphore lock detected!
...
2008-09-01T17:22:34+02:00 0:01 0.030u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/usr/local/lib/ImageMagick-6.3.3/config/magic.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.030u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/usr/local/share/ImageMagick-6.3.3/config/magic.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.030u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/usr/local/share/doc/ImageMagick-6.3.3/magic.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.030u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/usr/local/share/ImageMagick-6.3.3/magic.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.030u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "/Users/romain/.magick/magic.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.030u 6.3.3 Configure convert[993]: configure.c/unknown/482/Configure
Searching for configure file: "magic.xml"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.030u 6.3.3 Configure convert[993]: magic.c/unknown/673/Configure
Loading magic map "/usr/local/share/ImageMagick-6.3.3/config/magic.xml" ...
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.070u 6.3.3 Module convert[993]: module.c/unknown/1065/Module
Searching for module "TIFF" using filename "tiff.la"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.070u 6.3.3 Module convert[993]: module.c/unknown/582/Module
Searching for coder module file "tiff.la" ...
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.070u 6.3.3 Module convert[993]: module.c/unknown/1085/Module
Opening module at path "/usr/local/lib/ImageMagick-6.3.3/modules-Q16/coders/tiff.la"
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.070u 6.3.3 Module convert[993]: module.c/unknown/1120/Module
Method "RegisterTIFFImage" in module "TIFF" at address 0x15364f8
Warning: recursive semaphore lock detected!
2008-09-01T17:22:34+02:00 0:01 0.070u 6.3.3 Module convert[993]: module.c/unknown/1135/Module
Method "UnregisterTIFFImage" in module "TIFF" at address 0x15366f2
Warning: recursive semaphore lock detected!
magick
Site Admin
Posts: 11064 Joined: 2003-05-31T11:32:55-07:00
Post
by magick » 2008-09-01T12:36:03-07:00
You should not be getting a recursive semaphore lock. If you have the time, try ImageMagick 6.4.3-5, the latest release.
The debugging information suggests the TIFF coder is found but that does not mean ImageMagick has built-in TIFF support. Type
Is TIFF associated with the DELEGATES tag? If not, rerun the configure script and verify that the TIFF delegate library is validated (check the last 40 or so lines of output). If not, review the config.log file and fix whatever problem it mentions as the reason why TIFF was not validated.