comp.lang.ada
 help / color / mirror / Atom feed
* ImageMagick libs and Ada
@ 2002-02-01 15:46 Zach Swanson
  2002-02-01 16:05 ` Jeffrey Creem
  2002-02-01 18:46 ` Stephen Leake
  0 siblings, 2 replies; 7+ messages in thread
From: Zach Swanson @ 2002-02-01 15:46 UTC (permalink / raw)


I'm hoping that perhaps someone here has tried to use the ImageMagick
graphics suite and sucessfully imported functions into Ada95.

Working on my senior year capstone project at USMA, my team is
developing a computer vision system and doing some parabolic mirror
image undistortion using ImageMagick-5.4.1 to access the
bitmaps/pixels. We are compiling the C code in Cygwin, and the Ada
code using GNAT under Windows 2000.

We have written our initial functions for this in ANSI C, the language
that ImageMagick is developed in. We would like to be able to import
these functions into Ada95, otherwise our only option is to compile
the C as an exectuble and use the GNAT "spawn" command to run the
binary as a seperate process. This is undesirable though since we
cannot pass/recieve paramaters this way.

Our import looks like this so far:
pragma import (C, undistort_func, "undistort_func");
pragma linker_options("img_manip.o");
pragma linker_options("img_functions.o");

With just this code the link would fail though because the ImageMagick
functions aren't included in the object code, so we also provided a
linker argument to the lib files provided by ImageMagick. This
argument was found using the Magick-Config file:
pragma linker_options("-L c:\cygwin\usr\local\lib\ -lmagick -ljpeg -lz
-lm -lpthread");

At this point all the lib files are found by the linker, but it
generates several hundred errors. The errors are generated inside the
source code of all the ImageMagick routines. The error message looks
like this:
"In function 'GetImageMagick' magick.c:178: undefined reference to
'__assert'
Other values that the linker is unable to reconcile are __impure_ptr
and __errno.

My faculty advisors suggested adding the linker argument -lc to
include the standard C library, but this didn't work either.

If anyone has successfully imported the ImageMagick library into
Ada95, or if you are familiar with the type of problem we're having,
help or suggestions would be much appreciated.
Thank you
Zach Swanson, United States Military Academy



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-02-02 12:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-01 15:46 ImageMagick libs and Ada Zach Swanson
2002-02-01 16:05 ` Jeffrey Creem
2002-02-02  5:06   ` Zach Swanson
2002-02-02 12:48     ` Jeffrey Creem
2002-02-01 18:46 ` Stephen Leake
2002-02-02  5:03   ` Zach Swanson
2002-02-02 12:52     ` Zach Swanson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox