Re: gtk_init() crashes



Owen Taylor wrote:
On Mon, 2003-03-10 at 05:02, Russell Shaw wrote:

Hi,

I'm trying to get a gtk example to run which i just compiled:

russell main~/gtk: ./example

** (example:2922): WARNING **: Couldn't load font "Sans 10" falling back to "Sans 10"
** (example:2922): WARNING **: Couldn't load font "Sans 10" falling back to "Sans 10"
** (example:2922): WARNING **: All font failbacks failed!!!!

In gdb, the crash happens in gtk_init(). How can i trace into gtk_init() with gdb?


I wouldn't bother ... you need to fix the above error, and then things will work. (Though I don't think it is actually occuring inside
gtk_init() ... gtk_init() doesn't do any font stuff as far as I recall.
So, I think your program is actually getting past gtk_init(). Most
likely, it's just that since your GTK+ version doesn't have debugging
symbols, gdb's output is very approximate.


I currently compile with:

  CCFLAGS = -Wall -g `pkg-config --cflags glib-2.0 gtk+-2.0` ;
  LINKLIBS = `pkg-config --libs glib-2.0 gtk+-2.0` ;


If you want to step into gtk_init(), then you need GTK+ compiled
with debugging symbols, not your program.

Hi,
I compiled everything (gtk) from source and installed it, but running
the example gives:

russell main~/AAProjs/sch: ./scribble-xinput
./scribble-xinput: error while loading shared libraries: libgtk-x11-2.0.so.0:
                           cannot open shared object file: No such file or directory

How do i tell a program where to find a run-time library?




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