How does a C compiler find that -lm is pointing to the file libm.a?
How does a C compiler find that -lm is pointing to the file libm.a?
install: /usr/lib/gcc/i686-redhat-linux/4.4.4/
programs: =/usr/libexec/gcc/i686-redhat-linux/4.4.4/:/usr/libexec/gcc/i686-redhat-linux/4.4.4/:/usr/libexec/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/:/usr/libexec/gcc/i686-redhat-linux/4.4.4/:/usr/libexec/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/:/usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../i686-redhat-linux/bin/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../i686-redhat-linux/bin/
libraries: =/usr/lib/gcc/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../i686-redhat-linux/lib/i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/4.4.4/../../../../i686-redhat-linux/lib/:/usr/lib/gcc/i686-redhat-linux/4.4.4/../../../i686-redhat-linux/4.4.4/:/usr/lib/gcc/i686-redhat-linux/4.4.4/../../../:/lib/i686-redhat-linux/4.4.4/:/lib/:/usr/lib/i686-redhat-linux/4.4.4/:/usr/lib/
You can add more library search paths by using the "-L /path" option.
In those paths, it first searches for "dynamic libraries" which are named with a ".so" extension. It then searches for static libraries with a ".a" extension. It always adds "lib" to the front of the name.
https://stackoverflow.com/questions/3907498/how-does-a-c-compiler-find-that-lm-is-pointing-to-the-file-libm-a
How does a C compiler find that -lm is pointing to the file libm.a?相关推荐
- gmp4.3.2 安装时 ./configure报错: error: could not find a working compiler
今天在虚拟机上想安装gcc4.9.3 但貌似有三个依赖,那就顺序装吧. 装到gmp的时候.怎么都configure不过去,各种查各种不行,但是我之前在别的机器装成功过. 刚开始一直以为是某个编译程序没 ...
- gmp4.3.2 安装 configure: error: could not find a working compiler
今天在虚拟机上想安装gcc4.7.2 但貌似有三个依赖. 那就顺序装吧. 装到gmp的时候.怎么都configure不过去,各种查各种不行,但是我之前在别的机器装成功过. 刚开始一直以为是某个编译程序 ...
- 五大学科竞赛(三)-o2 -lm编译选项
使用 math.h 必须使用 -lm 参数指定指定链接到 libm.so 使用 O2 优化也能过编译的原因是,在优化的过程中, sqrt(a) 会被直接优化成最终的常数,所以这个时候其实并不需要真正链 ...
- 327 - Evaluating Simple C Expressions
2019独角兽企业重金招聘Python工程师标准>>> 题意: C 表达式运算, 变量为 a-z, 代表运算数为 1-26; 运算符包括 +, -, ++, --; 要求输出原表达式 ...
- 445 - Marvelous Mazes
2019独角兽企业重金招聘Python工程师标准>>> 题意: 根据输入画出迷宫.输入的字符串中包含字符和数字, 其中数字表示其后紧跟着的字符的重复次数(若连续出现两个以上的数字, ...
- 127 - Accordian Patience
2019独角兽企业重金招聘Python工程师标准>>> 题意: 移牌游戏,按以下规则: 1. 从左向右, 考虑每张牌, 若某张牌与其左边第1张或左边第3张是同一个牌号或花色, 则就把 ...
- 297 - Quadtrees
2019独角兽企业重金招聘Python工程师标准>>> 题意: 1. 两张 32*32 像素的图像进行叠加, 像素只有黑白两种颜色, 按以下规则叠加: (1). 黑+黑=黑; (2) ...
- An Introduction to GCC - 2 Compiling a C program (编译 C 程序)
An Introduction to GCC - 2 Compiling a C program (编译 C 程序) for the GNU Compilers gcc and g++ Brian G ...
- maven scala plugin 实现jvmArgs,执行过程原理解析笔记
scala-maven-plugin 构建scala,springboot工程 我们在使用maven构建scala工程的时候, 要使用scala-maven-plugin插件,常规配置如下 : < ...
- linux gcc编译参数顺序问题
初学Linux C编程遇到编译出错 运行下面编译命令,出错 gcc -g -W -Wall -pthread -lcrypto -o httpd httpd.c 错误信息: /tmp/ccYw8W8 ...
最新文章
- 位图排序 大数据_干货分享:大话12种排序算法
- spring mvc学习(22):/textpath/*/helen
- 【Flink】Flink 提交任务到yarn报错 proxy provider ConfiguredFailoverProxyProvider NetUtils.getSocketAddressS
- 蚂蚁集团,打响2022反内卷第一枪?
- 网站改版进行时,需要注意的
- python实现判断一个字符串是否是合法IP地址
- Atitit 智能云网络摄像机的前世今生与历史 优点 密码默认888888
- 【HDU 4699】Editor【栈】
- python群发邮件 不进垃圾箱_邮件群发不进垃圾箱
- YOLOX训练代码分析3-损失函数
- c语言字符类型中int表示什么,int表示什么数据类型
- 将家安在天涯,将这儿作为副战
- 如何设置本电脑中的mysql让别人的电脑连接
- 【Python】python 程序示例
- 给PowerPoint按钮加上提示文字
- 我们的UED设计流程及方法
- Firefox火狐快捷键
- 经久不衰的运输层协议 —— TCP协议
- 16位汇编编译报错和解决办法
- ICT 2017 | 以色列驻华大使馆商务官欧美雅: 以色列人一直都在追求创新