Setting up GTKmm in Eclipse for C++

前端 未结 3 2091
庸人自扰
庸人自扰 2021-01-25 17:49

I am trying to create a GUI using GTKmm in Eclipse, however I can\'t get the configuration working. For reference, here is my actual code:

#include 

        
3条回答
  •  感动是毒
    2021-01-25 18:43

    I performed two test. One with your source instance and one with an instance from a simple file from the site. Both worked flawlessly the first time using the steps below.

    A Hello World example from the gtkmm website with Success: https://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/helloworld

    First I installed the pkg-config Eclipse Plugin:
    https://code.google.com/p/pkg-config-support-for-eclipse-cdt/

    Then:

    • Created a new empty C++ project in Eclipse
    • Added three files to the project (helloworld.cpp, helloworld.h, main.cc)
    • Added pkg-config-support to the project: [(right click on Project) -> Properties -> C++ Build -> Settings -> Pkg-config -> (checkmark) gtkmm-3.0 -> OK
    • From Eclipse I Cleaned, then Build all, then was able to Run the example.

提交回复
热议问题