当前位置:网站首页>g++ parameter description
g++ parameter description
2022-08-03 06:11:00 【Shiyu】
-I (capital i)
Function: Find header files.The search order is -I{path}->/usr/include->usr/local/include
g++ main.cpp -o main -I /home/linyu/include/
-l (lowercase l)
Role: Specify the library to be linked by the program, followed by the library name.The search order is -I{path}->/usr/lib->usr/local/lib
Example: The library name of the math library is m, and his library file name is libm.so.Note that the dynamic library is linked first, followed by the static library.
g++ main.cpp -o main -lzmq
-L(uppercase L)
Libraries placed in /lib, /usr/lib and /usr/local/lib can be linked directly with the -l (lowercase l) parameter, but if the library files are not placed in these three directories, andIf it is placed in another directory, then if we only use the -l parameter, the link will still go wrong. For example, if we put libm.so in the /aaa/bbb/ccc directory, the link parameter is -L /aaa/bbb/ccc -lm
g++ main.cpp -o main -L /aaa/bbb/ccc -lm
-g
Function: to generate debugging information, the program can be debugged by the debugger.
g++ -g main.cpp -o main
边栏推荐
猜你喜欢
自监督论文阅读笔记 SimCLRV2 Big Self-Supervised Models are Strong Semi-Supervised Learners
稳压二极管的工作原理及稳压二极管使用电路图
自监督论文阅读笔记FIAD net: a Fast SAR ship detection network based on feature integration attention and self
优雅的拦截TabLayout的点击事件
cb板上常用的电子元器件都有哪些?
ZEMAX | 探索 OpticStudio中的序列模式
自我监督学习和BERT模型
001_旭日X3派初探:开箱测试
IPC通信 - 管道
ZEMAX | How to rotate any element around any point in space
随机推荐
double型数据转字符串后通过MCU串口发送
交叉熵(第六周)
2021-03-22
2021-04-30
2021-03-22
三、final、finally、 finalize有什么不同?
IO 复用
cmdline -[command line,__fdt_pointer,initial_boot_params] boot_command_line 获取
Convolutional Nerual Nertwork(CNN)
classpath:与classpath*的比较
ZEMAX | 如何使用渐晕系数
【第三周】ResNet+ResNeXt
自监督论文阅读笔记 S3Net:Self-supervised Self-ensembling Network for Semi-supervised RGB-D Salient Object Det
ucos任务调度原理
window下VS2022封装静态库以及调用静态库
对象の使用
西塞罗 论老年
STM32启动文件的选择
自监督论文阅读笔记 DenseCL:Dense Contrastive Learning for Self-Supervised Visual Pre-Training
自监督论文阅读笔记 Self-supervised Label Augmentation via Input Transformations