Results 1 to 9 of 9

Thread: Eclipse CDT+GTKMM

  1. #1
    Join Date
    Apr 2007
    Beans
    Hidden!

    Eclipse CDT+GTKMM

    Hey guys!! I am using the Eclipse CDT and program mainly in C++. I have tried anjuta, but I much prefer Eclipse CDT, mainly because the autocomplete in anjuta is terrible. Has anyone managed to use the Eclipse CDT and GTKMM together and compiled a working project? If so, could you please tell me how to setup Eclipse for GTKMM?

  2. #2
    Join Date
    Jun 2005
    Beans
    116

    Re: Eclipse CDT+GTKMM

    /BUMP

    I am after the same thing.. I want to use libglade, trying to get it working right now... did you find any solution?

    The reason for GTK and Eclipse.. cross-platform! I need to be able to take my software over to windows and re-build there.

  3. #3
    Join Date
    Nov 2004
    Location
    London
    Beans
    101
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Eclipse CDT+GTKMM

    More of the same, but in my case is CDT GTK-2 using C not C++. It should be the same, but after looking at CDT site for a guide onto how to link libraries I still can't manage to get a simple gtk hello world program. Any ideas over here?
    /*Books, ways and days, give men wisdom*/
    My Blog

    Ubuntu user number # 9559

  4. #4
    Join Date
    Nov 2004
    Location
    London
    Beans
    101
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Eclipse CDT+GTKMM

    I think I found it, but I'm not totaly sure. Once you have created a project go to:

    Project-->Properties--->C/C++ Build---> Tool Settings tab ---> GCC C Compiler--->Directories

    And then add /usr/include/gtk-2.0 or /usr/include/gtkmm
    /*Books, ways and days, give men wisdom*/
    My Blog

    Ubuntu user number # 9559

  5. #5
    Join Date
    Oct 2006
    Beans
    513

    Re: Eclipse CDT+GTKMM

    It seems like the easiest thing whould be to make your own makefile, and use a Standard make c/c++ project.

    So you'll probably need to learn make basics (and pgk-config)

  6. #6
    Join Date
    Nov 2004
    Location
    London
    Beans
    101
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Eclipse CDT+GTKMM

    Only if the project is small; on a mid-big one, writing the makefile by yourself can be a nightmare. That's one of the points of using an IDE; to avoid not-coding work. Tha's my opinion.
    /*Books, ways and days, give men wisdom*/
    My Blog

    Ubuntu user number # 9559

  7. #7
    Join Date
    Oct 2006
    Beans
    513

    Re: Eclipse CDT+GTKMM

    Yes, you might say that. Problem is that (as far as I can see) eclipse is not mature enough.

    If it's a big project, it would be a good idea to use automake/conf.

    If your really want to do it from eclispe (managed build) do this:
    Code:
    pkg-config --cflags gtkmm-2.4
    pkg-config --libs gtkmm-2.4
    Everythink behind "-I" should go in extra include paths, and everything behind "-l" should go in libraries.

    DISCLAIMER:
    I'm *not* a very experienced eclipse user. (nor an gnu autotools expert or a gtk guru)

    EDIT:
    I think I found it, but I'm not totaly sure. Once you have created a project go to:

    Project-->Properties--->C/C++ Build---> Tool Settings tab ---> GCC C Compiler--->Directories

    And then add /usr/include/gtk-2.0 or /usr/include/gtkmm
    Yes, that's it. In addition you need to specify extra libraries under linker option. (see output from pgk-config)

  8. #8
    Join Date
    Feb 2008
    Beans
    5

    Exclamation Re: Eclipse CDT+GTKMM

    Here you will find a resolution of your problem:

    http://kapo-cpp.blogspot.com/2007/02...d-eclipse.html

  9. #9
    Join Date
    Jan 2010
    Beans
    4

    Re: Eclipse CDT+GTKMM

    I added this:
    pkg-config --cflags --libs gtkmm-2.4
    to 'command line pattern' of Project -> Properties -> C/C++ Build -> Settings -> Tool settings -> GCC C++ Compiler and GCC C++ Liker.
    It works for me.

    Regards,
    Vinícius

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •