当前位置:网站首页>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
边栏推荐
猜你喜欢
自监督论文阅读笔记 TASK-RELATED SELF-SUPERVISED LEARNING FOR REMOTE SENSING IMAGE CHANGE DETECTION
IPC通信 - 管道
各种cms getshell技巧
ZEMAX | 探究 OpticStudio 偏振分析功能
MMU 介绍-[TBL/page table work]
JS--正则表达式
关于梯度下降法的一些优化方法
自监督论文阅读笔记Reading and Writing: Discriminative and Generative Modelingfor Self-Supervised Text Recogn
IPC 通信 - IPC
window下VS2022封装静态库以及调用静态库
随机推荐
Convolutional Nerual Nertwork(CNN)
ZEMAX | 如何围绕空间中的任何点旋转任何元素
自监督论文阅读笔记 Ship Detection in Sentinel 2 Multi-Spectral Images with Self-Supervised Learning
梯度下降、反向传播
三分钟看懂二极管的所有基础知识点
2021-04-30
What is parametric design, let's understand it through practical operation?| SOLIDWORKS How-To Videos
MCU接收串口字符型数据转换成数据型数据
Qemu 搭建Armv8 平台
001_旭日X3派初探:开箱测试
C# Base64加密
自监督论文阅读笔记 Self-Supervised Deep Learning for Vehicle Detection in High-Resolution Satellite Imagery
ZEMAX | 在OpticStudio中建立扩增实境(VR)头戴式显示器
稳压二极管的工作原理及稳压二极管使用电路图
自我监督学习和BERT模型
深度学习基本概念
Practice of MySql's Sql statement (try how many you can write)
Makefile
神经网络基础
B.1#【编程语言】—1 arm 汇编指令