小编dan*_*dan的帖子

curl 在运行时需要 openssl 吗?

Curl 将 openSSL 列为https://curl.se/docs/libs.html的外部依赖项。

但是,如果我这样做otool -L $(which curl)(macOS 12.5),我会得到以下输出:

/usr/bin/curl:
    /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 9.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.120.1)
Run Code Online (Sandbox Code Playgroud)

没有 openSSL。这是因为它只需要编译/构建curl,但在运行时不需要作为外部库?

如果删除 openSSL,curl 仍然有效吗?

c macos curl openssl

6
推荐指数
1
解决办法
3882
查看次数

嵌套的for循环仅运行内部循环(C ++)

我对C ++还是很陌生,我相信我的问题的答案非常非常简单。

我一直在使用Eclipse IDE,但最近已更改为简单的文本编辑器,并使用命令行进行了编译。(由于我目前没有自己的计算机,因此我不允许在正在使用的计算机上安装任何东西)。

但是,在编写程序时,我注意到无论何时嵌套循环,它都只会运行内部循环。

我尝试使用不同的在线编译器编译代码,这会导致相同的问题。

因此,我相信问题与Eclipse正在自动处理的简单问题有关。

#include <iostream>

int main() {
  for (int i; i<3; i++) {
    for (int j; j<3; j++) {
      std::cout << j << std::endl;
    }
  }
  return 0;
}
Run Code Online (Sandbox Code Playgroud)

上面是我想到的最简单的示例,它产生了问题。预期的输出为0、1、2、0、1、2、0、1、2,但是仅在编译并运行时输出0、1、2。

c++ loops

0
推荐指数
1
解决办法
58
查看次数

标签 统计

c ×1

c++ ×1

curl ×1

loops ×1

macos ×1

openssl ×1