当前位置:网站首页>GCC:头文件和库文件的路径
GCC:头文件和库文件的路径
2022-08-05 00:41:00 【风静如云】
GCC有以下几个环境变量用于指定头文件和库文件的路径:
C_INCLUDE_PATH:用于指定C的头文件路径
CPLUS_INCLUDE_PATH:用于指定C++的头文件路径
LD_LIBRARY_PATH:用于指定运行时,库文件的路径(优先级要高于系统默认的查找路径)
LIBRARY_PATH:用于指定编译时,库文件的路径
如需修改这几个环境变量可以通过以下几种方法:
1.直接在命令行里输入(仅一次有效,终端关闭后失效),如:
export C_INCLUDE_PATH=XXXX:$C_INCLUDE_PATH
2.修改/etc/profile中完成(对所有用户生效),如:
export C_INCLUDE_PATH=XXXX:$C_INCLUDE_PATH
3.修改~/.bashrc(对当前用户生效),如:
export C_INCLUDE_PATH=XXXX:$C_INCLUDE_PATH
另外可以在编译时指定路径:
-I XXX:指定头文件路径
-L XXX:指定静态/动态库路径(编译时)
边栏推荐
- node uses redis
- 软件测试面试题:软件测试类型都有哪些?
- Software Testing Interview Questions: What aspects should be considered when designing test cases, i.e. what aspects should different test cases test against?
- tiup telemetry
- 倒计时1天!8月2日—4日与你聊聊开源与就业那些事!
- oracle创建表空间
- gorm joint table query - actual combat
- 2022 Multi-school Second Session K Question Link with Bracket Sequence I
- The method of freely controlling concurrency in the sync package in GO
- could not build server_names_hash, you should increase server_names_hash_bucket_size: 32
猜你喜欢
随机推荐
2022 Hangzhou Electric Power Multi-School Session 3 K Question Taxi
Inter-process communication and inter-thread communication
ARC129E Yet Another Minimization 题解 【网络流笔记】
2022 Nioke Multi-School Training Session H Question H Take the Elevator
软件测试面试题:软件测试类型都有哪些?
leetcode: 266. All Palindromic Permutations
tiup telemetry
oracle create tablespace
oracle创建用户以后的权限问题
Software Testing Interview Questions: What do you think about software process improvement? Is there something that needs improvement in the enterprise you have worked for? What do you expect the idea
Software Testing Interview Questions: What do test cases usually include?
2022 Multi-school Second Session K Question Link with Bracket Sequence I
Software testing interview questions: How many types of software are there?
2022 Hangzhou Electric Power Multi-School Session 3 Question L Two Permutations
tensor.nozero(),面具,面具
Matlab uses plotting method for data simulation and simulation
D - I Hate Non-integer Number (选数的计数dp
GO中sync包自由控制并发的方法
Mysql_12 多表查询
D - I Hate Non-integer Number (count of selected number dp
![[230]连接Redis后执行命令错误 MISCONF Redis is configured to save RDB snapshots](/img/fa/5bdc81b1ebfc22d31f42da34427f3e.png)








