How can I find the header files of the C programming language in Linux?

前端 未结 10 1804
南笙
南笙 2020-12-07 08:42

When I write C programs in Linux, and then compile them using gcc, I am always curious about where those header files are. For example, where stdio.h is. More g

10条回答
  •  臣服心动
    2020-12-07 09:00

    locate stdio.h
    

    or

    mlocate stdio.h
    

    but locate relies on a database, if you have never updated it

    sudo updatedb
    

    you can also enquire gcc to know what are the default directories that are scanned by gcc itself:

    gcc -print-search-dirs
    

提交回复
热议问题