Linux guys: Help installing gtkmm (problem with include path)

Discussion in 'OT Technology' started by Joe_Cool, Oct 28, 2003.

  1. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,296
    Likes Received:
    555
    I tried to install gtkmm, a c++ toolkit for gtk, on my RH9 computer yesterday. Everything compiled just fine, and make install ran fine.

    /usr/include has a subdirectory called gtkmm-2.0, which contains all the headers for the library.

    But when I compile, I get errors with missing header files.

    The code I'm compiling is simple:

    gtktest.cpp:

    #include <gtkmm.h>
    int main(){
    return 0;}

    then I run the compiler:
    [[email protected] progs]# g++ gtktest.cpp -o gtktest
    gtktest.cpp:1:19: gtkmm.h: No such file or directory

    I tried changing the include line to read:
    #include "gtkmm-2.0/gtkmm.h"
    and instead of the single line error, I get a list of all the header files #included from gtkmm.h, all listed as missing.

    So the basic question is this:
    How can I get the include path for gcc/g++ to also search subdirectories of /usr/include? I suppose I could edit all the header files in the subdirectory to use the "gtkmm-2.0/foo.h" notation or add -I/usr/include/gtkmm-2.0 (and every other subdir that's there), but that really doesn't seem like the right way to go.

    Suggestions?
     
  2. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,296
    Likes Received:
    555
    Anyone? Anyone?
     
  3. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Try copying /usr/include/gtkmm-2.0/gtkmm.h to /usr/include/gtkmm.h.
     
  4. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,296
    Likes Received:
    555
    I tried that, and I'm still getting screens full of errors. It appears to be finding the files, but I'm getting errors like undefined macros and syntax errors.

    I ended up reloading the system and trying from scratch, but I'm getting the same problem with glib (which is a dependency for gtkmm, and may be the source of the original problem).

    The errors appear to be stemming from files included in the wrong order, but I don't know enough to try to fix it. :confused:
     

Share This Page