【问题标题】:What does "-I" and "-L" mean when prepended to a path?在路径前添加“-I”和“-L”是什么意思?
【发布时间】:2019-12-05 01:59:03
【问题描述】:

使用brew安装openssl时,输出部分响应:

For compilers to find openssl you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl/include"

以下可用于编译 C++ 文件。

g++ file.cpp -I/usr/local/opt/openssl/include

-I 和 -L 是干什么用的?

【问题讨论】:

标签: c++ macos path openssl


【解决方案1】:

-L 表示路径是一个目录,其中包含 L用于链接的库(将路径添加到链接器将搜索的目录集)

-I 表示有头文件包含在给定的目录中。

【讨论】:

    猜你喜欢
    • 2022-09-28
    • 1970-01-01
    • 1970-01-01
    • 2012-03-12
    • 2023-04-06
    • 2010-11-01
    • 2013-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多