-I 选项在 g++ 中起什么作用?称呼?
我很难找到有关最常见 g++ 选项的良好文档。我有以下 g++ 命令,我试图很好地理解它:
g++ q1.cpp -o q1 -I/usr/local/include/opencv -L/usr/local/lib -lm -lopencv_core -lopencv_highgui -lopencv_calib3d -lopencv_imgproc
-I
选项的作用是什么?
I'm having a hard time finding good documentation on the most common g++ options. I have the following g++ command and I'm trying to understand it well:
g++ q1.cpp -o q1 -I/usr/local/include/opencv -L/usr/local/lib -lm -lopencv_core -lopencv_highgui -lopencv_calib3d -lopencv_imgproc
What does the -I
option do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
-I
添加到搜索包含文件的路径。-l
链接到特定的库。 (例如 -lm 链接 libm,它是数学)-I
adds to the path for searching for include files.-l
links to a particular library. (e.g. -lm links libm which is math)它不适用于库,我认为它仅适用于包含文件。 (这是
i
而不是l
,l
用于库)It's not for a library I think it's only for include files. (It's a
i
not al
,l
it's for libraries)