curl_version.md (985B)
1 --- 2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 SPDX-License-Identifier: curl 4 Title: curl_version 5 Section: 3 6 Source: libcurl 7 See-also: 8 - curl_version_info (3) 9 Protocol: 10 - All 11 Added-in: 7.1 12 --- 13 14 # NAME 15 16 curl_version - returns the libcurl version string 17 18 # SYNOPSIS 19 20 ~~~c 21 #include <curl/curl.h> 22 23 char *curl_version(); 24 ~~~ 25 26 # DESCRIPTION 27 28 Returns a human readable string with the version number of libcurl and some of 29 its important components (like OpenSSL version). 30 31 For MultiSSL builds the string contains all SSL backend names and the inactive 32 backend names are in parentheses. For example "(OpenSSL/3.0.8) Schannel" or 33 "OpenSSL/3.0.8 (Schannel)". 34 35 We recommend using curl_version_info(3) instead. 36 37 # %PROTOCOLS% 38 39 # EXAMPLE 40 41 ~~~c 42 int main(void) 43 { 44 printf("libcurl version %s\n", curl_version()); 45 } 46 ~~~ 47 48 # %AVAILABILITY% 49 50 # RETURN VALUE 51 52 A pointer to a null-terminated string. The string resides in a statically 53 allocated buffer and must not be freed by the caller.