关于NTL以及GCC搜索路径

2017-05-01  本文已影响0人  ifeelok
配置参数:anjuta使用NTL.png
  1. NTL build test intall in/usr/local

  2. header files in /usr/local/include/NTL

  3. compiled binary in /usr/local/lib/libntl.a【静态库】

#include 引号,preprocessor先找当前文件夹,再找编译器默认路径
#include 尖括号,preprocessor直接找默认路径
cpp -v .dev/null -o /dev/null
查看默认search路径
#include <...> search starts here:
/usr/lib/gcc/x86_64-linux-gnu/4.9/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include

-Idir, which causes dir to be searched after the current directory (for the quote form of the directive) and ahead of the standard system directories. You can specify multiple -I options on the command line, in which case the directories are searched in left-to-right order.

通过环境变量来改头文件搜索路径:http://www.network-theory.co.uk/docs/gccintro/gccintro_23.html
上一篇下一篇

猜你喜欢

热点阅读