You are not logged in.

#1 2010-07-25 00:02:18

cyker
Member
Registered: 2009-05-30
Posts: 86

[SOLVED] How can I extract c/c++ standard headers for ctags?

Note. I mean to treat c/c++ separately below. The final objective is to get two tag files which are generated by ctags, one for c and one for c++.

1. Where are the c/c++ headers in Arch Linux distribution? I just know /usr/include/, but nowhere else. If there are other places, please tell me.

2. How can I use ctags to make tags just for these standard headers but not others? If I use ctags -R /usr/include/, all the files in /usr/include/ will be included. This is not I want. I just want the standard, necessary files.

3. If you know other methods to get the two tags mentioned above, please tell me.

Thanks very much~~

Last edited by cyker (2010-07-25 20:29:57)


.

Offline

#2 2010-07-25 17:42:32

Hohoho
Member
Registered: 2007-06-23
Posts: 222

Re: [SOLVED] How can I extract c/c++ standard headers for ctags?

One way to pinpoint it is to use pacman's query functions.
Something like this:

 pacman -Ql glibc | awk '/include\//{print $2}'

will give you the list of all the header files glibc provides, some of them are the C standard library, there are not that many of them so you can pick them out. (list of them here: http://en.wikipedia.org/wiki/C_standard_library )
C++ STL headers reside in /usr/include/c++/4.5.0/ and they belong to the gcc package:

pacman -Ql gcc | awk '/\/usr\/include/{print $2}'

Offline

#3 2010-07-25 20:29:37

cyker
Member
Registered: 2009-05-30
Posts: 86

Re: [SOLVED] How can I extract c/c++ standard headers for ctags?

Works well! Many thanks~


.

Offline

Board footer

Powered by FluxBB