-I 选项在 g++ 中起什么作用?称呼?

发布于 2024-12-03 23:07:48 字数 244 浏览 3 评论 0原文

我很难找到有关最常见 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

九八野马 2024-12-10 23:07:48

-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)

笑叹一世浮沉 2024-12-10 23:07:48

它不适用于库,我认为它仅适用于包含文件。 (这是 i 而不是 ll 用于库)

It's not for a library I think it's only for include files. (It's a i not a l, l it's for libraries)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文