By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,737 Members | 1,321 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,737 IT Pros & Developers. It's quick & easy.

gtkmm installation problem

rhitam30111985
100+
P: 112
Hi everyone , dunno whether to post this in linux forum or c/c++ forum..
I am trying to create GUI files using gtkmm library in c++ . I am using debian linux with GNOME desktop environment . i installed the required package for gtkmm namely ,

libgtkmm-2.4-dev

by running apt-get install libgtkmm-2.4-dev as root


after that , i tried running the folowing code :

Expand|Select|Wrap|Line Numbers
  1.  
  2. #include<iostream>
  3. #include<gtkmm/gtkmm.h>
  4.  
  5.  
  6. using namespace std;
  7.  
  8. int main(int argc,char* argv[])
  9.  
  10. {
  11.    GtkWidget *window;
  12.  
  13.     gtk_init (&argc, &argv);
  14.  
  15.     window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  16.     gtk_widget_show(window);
  17.  
  18.     gtk_main ();
  19.  
  20.  
  21.  
  22.   return 0;
  23. }
  24.  
  25.  

after compiling . it gave me the following errors :

start.cpp:2:24: gtkmm/gtkmm.h: No such file or directory
start.cpp: In function `int main(int, char**)':
start.cpp:10: error: `GtkWidget' was not declared in this scope
start.cpp:10: error: `window' was not declared in this scope
start.cpp:12: error: `gtk_init' was not declared in this scope
start.cpp:14: error: `GTK_WINDOW_TOPLEVEL' was not declared in this scope
start.cpp:14: error: `gtk_window_new' was not declared in this scope
start.cpp:15: error: `gtk_widget_show' was not declared in this scope
start.cpp:17: error: `gtk_main' was not declared in this scope

cant figure out why it is not reading the required header file .
any help appreciated ,
regards
Rhitam
Dec 5 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.