Unix Programming - Help needed with GTK+2.0

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > December 2004 > Help needed with GTK+2.0





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Help needed with GTK+2.0
bivek.agrawal@gmail.com

2004-12-16, 7:45 pm


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


Thanks
Bek

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..

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com