Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Problem with GTK+ Library [Linux Ubuntu]


  • Please log in to reply
No replies to this topic

#1 Cybbermouse

Cybbermouse

  • Members
  • 72 posts
  • OFFLINE
  •  
  • Gender:Female
  • Local time:10:25 AM

Posted 14 March 2015 - 06:06 AM

OS : Ubuntu 14.10; Language : C++;  IDE : Code::Blocks

I installed GTK+ using Terminal apt-get install libgtk2.0-dev

Then turned on Code::Blocks and Setting-->Compiler-->Other Options --> `pkg-config gtk+-2.0 --cflags`

And Settings-->Compiler-->Linker Options-->Other Options --> `pkg-config gtk+-2.0 --libs`

I created a cpp-file :

#include <gtk/gtk.h>
int main (int argc, char *argv[])
 {
    GtkWidget *okno;

    gtk_init (&argc, &argv);

    okno = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_widget_show (okno);

    gtk_main ();
    return 0;
}

Errors appeared. Build log :
g++: error: pkg-config: No such file or directory
g++: error: gtk+-2.0: No such file or directory
g++: error: unrecognized command line option ‘--cflags’

Thanks for help.


Edited by Cybbermouse, 14 March 2015 - 06:07 AM.


BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users