Mailinglist Archive: opensuse-programming (3 mails)
| < Previous | Next > |
Re: [opensuse-programming] "#include <gtk.h>" fails in gcc on SuSE 10.3
- From: Anders Johansson <ajh@xxxxxxxxxx>
- Date: Sat, 14 Jun 2008 17:19:59 +0200
- Message-id: <200806141719.59813.ajh@xxxxxxxxxx>
On Saturday 14 June 2008 17:05:00 David E wrote:
You need to have a few parameters on your gcc command line. The normal way
is to get those from pkgconfig. Try
gcc -o testgtk $(pkg-config --cflags gtk+-2.0) testgtk.c
Anders
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-programming+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-programming+help@xxxxxxxxxxxx
To begin learning GTK, I submitted the following one line C program:
#include <gtk/gtk.h>
That received an error message. After looking in /usr/include, I tried:
#include <gtk-2.0/gtk/gtk.h>
That received several error messages. Tried editing all the included
"gtk..." lines to "gtk-2.0...". That received floods of error messages.
What am I doing wrong? or is the SL 10.3 include file broken? All I want
to do is key in the "helloworld.c" program on p. 16 of Andrew Krause's
2007 book "Foundations of GTK+ Development". Starting with a one line C
program, just the #include statement, seemed easy enough, but it is not.
You need to have a few parameters on your gcc command line. The normal way
is to get those from pkgconfig. Try
gcc -o testgtk $(pkg-config --cflags gtk+-2.0) testgtk.c
Anders
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-programming+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-programming+help@xxxxxxxxxxxx
| < Previous | Next > |