GdkMagick: Advice needed
- From: Arthur Jerijian <lightmanaj earthlink net>
- To: gtk-list redhat com, magick wizards dupont com
- Cc: bfriesen simple dallas tx us
- Subject: GdkMagick: Advice needed
- Date: Tue, 19 Oct 1999 17:26:34 -0700
Hi all,
The latest versions of GdkMagick include a script called gdkmagick-config,
which allows a program to be compiled just by including
`gdkmagick-config --cflags` and `gdkmagick-config --libs` on the C compiler
command. However, it has been brought to my attention that this scheme may
cause problems, particularly since gdkmagick-config specifies the options for
ALL libraries, including ImageMagick and GTK+. What I decided to do, since
gdkmagick-config is all-inclusive, is to make the gdk_magick.h header file and
the gdk_magick_init functions all-inclusive too. This brings up several points:
1. A program that uses GdkMagick must only include <gdk_magick.h> and possibly
<gtk/gtk.h>, *without* including <magick/api.h> or <gdk/gdk.h>.
2. When a program initializes GdkMagick with the gdk_magick_init function, the
GDK library and the GdkRGB component are also initialized. The program
*MUST NOT* call gdk_init or gdk_rgb_init explicitly, unless it is known that it
is safe to call gdk_init or gdk_magick_init more than once in an application.
An alternative solution is to do away with gdkmagick-config altogether and to
just compile a program like this:
gcc -I/opt/GdkMagick/include \
`gtk-config --cppflags` \
`Magick-config --cppflags` \
program.c \
`gtk-config --libs` \
`Magick-config --libs` \
-lgdkmagick
If I use this approach, gdk_magick.h will not automatically include <gtk/gtk.h>
or <magick/api.h>, and the programmer must call gdk_init and/or gdk_rgb_init
explicitly before calling gdk_magick_init.
Which approach is better? Do any of you have any suggestions?
Thanks,
--Arthur
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]