手动更新gcc后需要配置环境

来源:互联网 发布:汽车美容软件招商 编辑:程序博客网 时间:2024/04/29 10:27

1

include 目录

安装目录/include/c++/?.?.?/x86_64-???-linux-gnu

安装目录/include/c++/?.?.?

安装目录/lib/gcc/x86_64-???-linux-gnu/?.?.?/include


2

编译器目录

安装目录/libexec/gcc/x86_64-???-linux-gnu/?.?.?


3

lib目录

安装目录/lib/gcc/x86_64-???-linux-gnu/?.?.?/


方法:


对于C

[plain] view plaincopy
  1. C_INCLUDE_PATH=/new/include/dir   
  2. export C_INCLUDE_PATH  


对于C++

[plain] view plaincopy
  1. CPLUS_INCLUDE_PATH=/new/include/dir   
  2. export CPLUS_INCLUDE_PATH  

查看添加结果:


对于C

[plain] view plaincopy
  1. echo | gcc -v -x c++ -E -  

对于C++

[plain] view plaincopy
  1. echo | g++ -v -x c++ -E -  
0 0
原创粉丝点击