| Nils O. Selåsdal 2004-12-19, 5:48 pm |
| Xref: number1.nntp.dca.giganews.com comp.unix.programmer:153125
On Tue, 14 Dec 2004 16:05:29 -0800, bivek.agrawal wrote:
>
> Hi all,
>
>
> I was trying to get started with GTK+2.0 by compiling the example
> source provided in GTK tutorial. But I am getting the following
> problems..... Please help
>
> % gcc -Wall -g example.c -o example `pkg-config --cflags gtk+-2.0`
> `pkg-config --libs gtk+-2.0` -lgtk-x11-2.0 -lgdk-x11-2.0 -lglib-2.0
> -lgdk_pixbuf-2.0
>
> % ./example
> Illegal instruction
This tells you the cpu hit an instruction it doesn't recognize.
Could be many things at fault. e.g.
gtk and friends are compiled for another cpu type, try run
"gtk-demo" to check if the gtk installation is ok.
Your program is compiled for a diffrent cpu type(e.g.
you are on a i586 and the gcc defaults to i686; try
force it to e.g. -march=i386
Or your program has a nasty buffer overflow that corrupts
the stack, and the instruction pointer gets wild..
|