当前位置:网站首页>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
边栏推荐
- 东南亚跨境电商
- classpath:与classpath*的比较
- KASLR-内核地址空间布局随机化
- Delightful Nuxt3 Tutorial (2): Build a Blog Quickly and Easily
- ZEMAX | 绘图分辨率结果对光线追迹的影响
- php连接数据库脚本
- 自监督论文阅读笔记 Ship Detection in Sentinel 2 Multi-Spectral Images with Self-Supervised Learning
- cobalt strike 的基础使用
- 6. What is the difference between Vector, ArrayList and LinkedList?(design, performance, safety)
- POE交换机全方位解读(中)
猜你喜欢

What is parametric design, let's understand it through practical operation?| SOLIDWORKS How-To Videos

【第二周】卷积神经网络

ZEMAX | 如何围绕空间中的任何点旋转任何元素

二叉树常见的问题和解决思路

2021-03-22

九、请介绍类加载过程,什么是双亲委派模型?

Dynamic adjustment subject web system?Look at this one is enough

softmax和最大熵

Convolutional Nerual Nertwork(CNN)

ZEMAX | 在OpticStudio中建立扩增实境(VR)头戴式显示器
随机推荐
【第四周】MobileNet和HybridSN
block底层探索
自监督论文阅读笔记 Ship Detection in Sentinel 2 Multi-Spectral Images with Self-Supervised Learning
嵌入汇编-1 格式讲解
ZEMAX | 如何使用渐晕系数
ARMv8 架构----armv8 类别
Typora
6. What is the difference between Vector, ArrayList and LinkedList?(design, performance, safety)
A.1#【内存管理】——1.1.3 page: struct page
Qemu 搭建Armv8 平台
自监督论文阅读笔记 DenseCL:Dense Contrastive Learning for Self-Supervised Visual Pre-Training
虚拟地址空间布局
A.1#【内存管理】——1.1.2 zone: struct zone
002_旭日X3派初探:TogetherROS安装
进程间通讯 (IPC 技术) - 信号
西塞罗 论老年
MATLAB给多组条形图添加误差棒
MySql【后面附有练习题】
IO 复用
内网渗透信息收集