-
according to the doc curl_global_init 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. however, I did not call it manually in the program and have not found any problems so far. Are there any hidden dangers? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
It's working for you because curl_easy_init calls curl_global_init(CURL_GLOBAL_DEFAULT) as a fallback when you haven't already called curl_global_init on your own. Technically you should call curl_global_init before any other libcurl function, with the exception of curl_global_sslset to select an SSL library before initialization. |
Beta Was this translation helpful? Give feedback.
Yes.