LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-13-2008, 12:07 AM   #1
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Rep: Reputation: 25
Error while running the tutorial example in Anjuta


I am using debian etch on Dell inspiron 1420 machine. It has display and sound problems.
I was trying to learn ANJUTA. I tried the Hello World program in the Anjuta Tutorial. But it failed. There were some warnings and one error message. I exactly did what the tutorial has asked me. So, there is no typing errors or errors like that.

This is the code which showed error while building the callbacks.c file. I actually dont know how the codes work. But I just copied the codes from the tutorial page.

Quote:
void
on_BT_OK_clicked (GtkButton *button, gpointer user_data)
{

GtkWidget *entry = lookup_widget (GTK_WIDGET(button), "ENTRY");
GtkWidget *msgbox = gnome_app_new("Hello World", "Hello World");
gchar *text1, *text2;

text1 = gtk_entry_get_text (GTK_ENTRY(entry));
text2 = g_strconcat ("Hello, ", text1, NULL);
gnome_app_message (GNOME_APP(msgbox), text2);
g_free (text2);
}
After I went for Build All, I got following warnings and error.

Warnings
Quote:
callbacks.c:18: warning: implicit declaration of function ‘gnome_app_new’
callbacks.c:18: warning: initialization makes pointer from integer without a cast
callbacks.c:21: warning: assignment discards qualifiers from pointer target type
callbacks.c:23: warning: implicit declaration of function ‘gnome_app_message’
callbacks.c:23: warning: implicit declaration of function ‘GNOME_APP’
Error
Quote:
../Projects/Hello/src/callbacks.c:23: undefined reference to `GNOME_APP'
** Is there any other packages I have to install for the correct working of the code?

I also tried Build-->compile. It also showed errors.
Quote:
callbacks.c:5:21: error: gtk/gtk.h: No such file or directory
Then I tried #include</usr/include/gtk-2.0/gtk/gtk.h> in the callbacks.c file. Again another message.
Quote:
Compiling file: callbacks.c ...
gcc -Wall -g -c "callbacks.c" -o "callbacks.o"
In file included from callbacks.c:6:
/usr/include/gtk-2.0/gtk/gtk.h:31:21: error: gdk/gdk.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:32:32: error: gtk/gtkaboutdialog.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:33:31: error: gtk/gtkaccelgroup.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:34:31: error: gtk/gtkaccellabel.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:35:29: error: gtk/gtkaccelmap.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:36:31: error: gtk/gtkaccessible.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:37:27: error: gtk/gtkaction.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:38:32: error: gtk/gtkactiongroup.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:39:31: error: gtk/gtkadjustment.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:40:30: error: gtk/gtkalignment.h: No such file or directory
/usr/include/gtk-2.0/gtk/gtk.h:41:26: error: gtk/gtkarrow.h: No such file or directory
Completed ... unsuccessful
Total time taken: 0 secs
** What should I do for the correct working of the program??
 
Old 12-13-2008, 01:19 AM   #2
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
apt-get install libgtk2.0-dev
 
Old 12-13-2008, 05:39 AM   #3
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Original Poster
Rep: Reputation: 25
I have already installed that package. Only then I got 4 warnings and 1 error. Before that, all I got was errors.
 
Old 12-13-2008, 07:11 AM   #4
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Original Poster
Rep: Reputation: 25
Quote:
apt-get install libgtk2.0-dev
I reinstalled the package and the program worked just perfectly.

Thank you
 
  


Reply

Tags
anjuta


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SuSE linux - Anjuta Tutorial will not start kmlinux Linux - Software 6 07-06-2006 02:46 PM
running anjuta within 32bit chroot linuxmandrake Ubuntu 0 02-16-2006 02:20 PM
libgdl Error with Anjuta 2.x MicahCarrick Linux - Software 2 10-04-2005 10:17 AM
Error on Anjuta? ukyo Programming 3 04-05-2005 12:31 AM
Anjuta make error jnusa Linux - Software 2 01-19-2005 02:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration