Curl library C language curl programming, curl Library
Curl programming in C Language
[Linux @ centos-64-min exercise] # gcc-Wall-o curltest. c
/Tmp/ccosVANi. o: In function 'main ':
Curltest. c :(. text + 0x2a): undefined reference to 'curl _ easy_init'
Curltest. c :(. text + 0x53): undefined reference to 'curl _ easy_setopt'
Curltest. c :(. text + 0x5c): undefined reference to 'curl _ easy_perform'
Curltest. c :(. text + 0x68): undefined reference to 'curl _ easy_cleanup'
Collect2: ld returned 1 exit status
Cause: the compiler cannot find the curl library file.
Solution: Determine the gcc-Wall-o curltest. c-l curl after the library is installed.
Install curl
1. Enter the directory of the compressed package
# Cd/root/soft
2. decompress the installation package
# Tar-zxf curl-7.42.1.tar.gz
3. Enter the decompressed installation package directory.
# Cdcurl-7.42.1
4. Configuration
#./Configure -- prefix =/usr/local/curl
5. Installation
# Make; make install