0

I have set up Eclipse (on Ubuntu 20.04) for C/C++ programming and are attempting to configure the IDE for Gtkmm.

I have installed the Pkg-config support for Eclipse for CDT 1.0.0 plug-in.

Then I have created a new C++ project and checked the Gtkmm-3.0 box in

  • Properties —C/C++ build —Settings — Pkg-config

Then I try to compile the following program:

#include <gtkmm.h>

class MyWindow : public Gtk::Window
{
public:
  MyWindow();
};

MyWindow::MyWindow()
{
  set_title("Basic application");
  set_default_size(200, 200);
}

int main(int argc, char* argv[])
{
  auto app = Gtk::Application::create("org.gtkmm.examples.base");

  return app->make_window_and_run<MyWindow>(argc, argv);
}

But I get the following error: Fatal error: Gtkmm.h : Cannot find file or folder

How do I configure the IDE or project to get it to compile?

Regards Jarl

  • 1
    I don't know about the PfgConfig support, but you could try to see if [this](https://stackoverflow.com/questions/58910311/configured-eclipse-for-gtkmm-and-gtk-on-ubuntu/62203484#62203484) works for you. – BobMorane Sep 14 '21 at 16:31
  • Also : it seems your code is written using Gtkmm 4. The `make_window_and_run` function is [available since Gtkmm 3.98 only](https://developer-old.gnome.org/gtkmm/stable/since_3_98.html#_since_3_98000014). – BobMorane Sep 16 '21 at 11:01
  • Are you sure the error message contains `Gtkmm.h`, spelled with the capital G? The code uses the lower case. – zkoza Sep 20 '21 at 23:08

0 Answers0