comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey Creem" <jeff@thecreems.com>
Subject: Re: ImageMagick libs and Ada
Date: Fri, 01 Feb 2002 16:05:55 GMT
Date: 2002-02-01T16:05:55+00:00	[thread overview]
Message-ID: <D1z68.65976$Ln2.14405383@typhoon.ne.mediaone.net> (raw)
In-Reply-To: 50c1a1b.0202010746.3ee4bd7a@posting.google.com

Not sure but you may run into problems trying to mix cygwin and non-cygwin
programs when the cygwin stuff uses a non mingw environment.. I think
you end up needing two different C libraries if you mix and match cygwin and
non
cygwin code in the same executable.

It looks like people have compiled this for native win32 (v.s. cygwin's unix
compatibility mode).
ftp://ftp.yggdrasil.com/mirrors/site/ftp.simplesystems.org/pub/ImageMagick/b
inaries/

(Note since the above does not seem to include import libraries you may have
to either figure out how to rebuild from source this way yourself or perhaps
use
the included dlls along with tools like dll2def to build gcc style import
libraries.

In any case this does not seem too hard but of course this may not even
really be the
actual problem you are hitting. Let us know how it works out.



"Zach Swanson" <x24702@usma.edu> wrote in message
news:50c1a1b.0202010746.3ee4bd7a@posting.google.com...
> 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





  reply	other threads:[~2002-02-01 16:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-01 15:46 ImageMagick libs and Ada Zach Swanson
2002-02-01 16:05 ` Jeffrey Creem [this message]
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
replies disabled

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