Re: Detecting if GNOME is OK
- From: Owen Taylor <otaylor redhat com>
- To: Dave Gilbert <gilbertd treblig org>
- Cc: ERDI Gergo <cactus cactus rulez org>, gnome-devel-list gnome org
- Subject: Re: Detecting if GNOME is OK
- Date: 26 Mar 2000 10:12:49 -0500
Dave Gilbert <gilbertd@treblig.org> writes:
> Hi,
> Hmm - the gtk_init_check stuff doesn't seem to be playing ball.
> The code I have is:
>
> static int test()
> {
> int argc=1;
> char *argv[2];
>
> argv[0]="elvis";
> argv[1]=NULL;
>
> gnomelib_init(PACKAGE,VERSION);
>
>
> if (gtk_init_check(&argc,&argv)) return 1;
>
> return 0;
> } /* test */
>
> ---------------------------------------------------
>
> works fine if DISPLAY is set, but segs if it isn't or if it is set to a
> non-existant display:
Check your C: since argv is an array, &argv == argv. What you
want is:
char *args[2];
char **argv = args;
args[0] = "elvis"
args[1] = NULL;
gtk_init_check (&argc, &argv);
With that change, your code works fine for me.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]