Setting up individual ctags db for standard C / C ++ libraries, boost and third-party libraries

I want to configure separate ctags databases for various libraries in /usr/include/ for use with OmniCppComplete .

The idea is to be able to extract only the libraries needed for a particular project in the target language - C or C ++.

For example, I would like to have one database for standard C libraries, one for system libraries that can be used by either C or C ++ programs (sockets / networks come to mind), one for standard C ++ libs / STL / Boost and then other databases for various third-party libraries such as QT or glib. Then I could do something by simply typing set tags+= ~/.vim/somelib.tags in vim.

I assume that everything related to C ++ stdlib and STL is in /usr/include/c++ and that Boost is in /usr/include/boost . Unfortunately, it seems that the standard C libs and system libraries are simply dropped directly into /usr/include/ using a variety of other materials.

How can I get a list of files and directories belonging to which libs? I'm on Ubuntu 8.04.

+4
source share
1 answer

apt-file is your friend on Ubuntu.

The following command will provide you with a list of all included files for Boost:

 apt-file list -x "^libboost" | grep '/include/' | cut -f2 -d: 

I will leave everything else as an exercise for the reader!

Refresh . To complete the call, call apt-file update if you have not used apt-file before.

+1
source

Source: https://habr.com/ru/post/1309628/


All Articles