lundi 24 août 2015

Gtkmm undefined reference to Gtk::Builder::create_from_file

I'm trying to open a GTK window with the GTKbuilder. I'm using the C++ GTK version, Gtkmm. But the following code, wich I got form the GTKmm tutroial Site doesn't works.

int main(int argc, char *argv[]){
    Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example");
    Gtk::Builder::create_from_file("window.glade");
    return 1;
}

I get the following error:

main.cpp:(.text+0x130f): undefined reference to `Gtk::Builder::create_from_file(std::__cxx11::basic_string, std::allocator > const&)' collect2: error: ld returned 1 exit status

If I build an ui without Glade, everything works fine.

Aucun commentaire:

Enregistrer un commentaire