- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
虽然它的文档说这个功能是必须的,但是我看到了两个例子,一个有,一个没有。
http://curl.haxx.se/libcurl/c/persistant.html
http://curl.haxx.se/libcurl/c/multi-app.html
这个功能有必要吗?
最佳答案
如果它被设计出来,那将是必要的。 documentation说:
This function must be called at least once within a program (a program is all the code that shares a memory space) before the program calls any other function in libcurl. The environment it sets up is constant for the life of the program and is the same for every program, so multiple calls have the same effect as one call.
但请注意,在 curl_easy_init 的文档中:
If you did not already call curl_global_init(3), curl_easy_init(3) does it automatically. This may be lethal in multi-threaded cases, since curl_global_init(3) is not thread-safe, and it may result in resource problems because there is no corresponding cleanup.
关于c - 什么时候需要 curl_global_init() ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6087886/
我正在 Ubuntu 18.04 上编译 C++ 应用程序。链接器无法从库中获取所需的函数,或者它没有找到正确的库 我的 libcurl.so 位于 /usr/local/lib nm -D 列出了所
虽然它的文档说这个功能是必须的,但是我看到了两个例子,一个有,一个没有。 http://curl.haxx.se/libcurl/c/persistant.html http://curl.haxx.
我正在开发一个照相亭应用程序,它使用 3 个模块来提供打印、捕获和触发功能。这个想法是人们可以为其开发扩展此功能的模块。这些模块被实现为共享库,当用户单击“开始”时,它们在运行时加载。 我正在尝试实现
我正在尝试在 C 中使用 Curl。 我访问了 Curl 官方页面,并复制了示例源代码。 链接如下: http://curl.haxx.se/libcurl/c/sepheaders.html 当我用
我正在尝试使用C++中的Curl。。我访问了Curl官方页面,并复制了样例源代码。。以下是链接:http://curl.haxx.se/libcurl/c/sepheaders.html。当我使用“G
我是一名优秀的程序员,十分优秀!