Using gtags for gtk headers and my own project

I have a gtk project and I want to use gtags for my project. I also would like to use gtags for the external libraries, in my case gtk. I tried:

find /usr/include/gtk-2.0 -name "*.h" > gtk_headers
gtags -f gtk_headers

Unfortunately, I get a segmentation fault here (using Ubuntu 12.04)

Any ideas how to get this work? (I am also happy with a solution with ctags or etags).


  • Please try this:

    $ (cd /usr/include/gtk-2.0; gtags)          # make tag in the library project
    $ gtags                                     # make tag in your project
    $ GTAGSLIBPATH=/usr/include/gtk-2.0; export GTAGSLIBPATH
    $ global -x xxx

    If 'xxx' exists in your project, global show it. Otherwise, if 'xxx' exists in the library projects, global show it.

    To show both of them, please try this:


    If you have many libraries then please specify them like PATH environment variable.

    $ GTAGSLIBPATH=/usr/src/lib:/usr/include/gtk-2.0; export GTAGSLIBPATH

    Good luck!