Re: Detecting if GNOME is OK



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:

#0  strlen () at ../sysdeps/alpha/strlen.S:45
#1  0x20001dacbe4 in g_strdup () from /usr/lib/libglib-1.2.so.0
#2  0x2000118ef58 in gdk_init_check () from /usr/lib/libgdk-1.2.so.0
#3  0x20000fa0a74 in gtk_init_check () from /usr/lib/libgtk-1.2.so.0

Other suggestions?

Dave

-- 
 ---------------- Have a happy GNU millennium! ----------------------   
/ Dr. David Alan Gilbert      | Running GNU/Linux on       |  Happy  \ 
\   gro.gilbert @ treblig.org |  Alpha, x86, ARM and SPARC |  In Hex /
 ____________________________|___ http://www.treblig.org  |________/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]