I installed curl this command (i use Ubuntu):
sudo apt-get install curl
When I test simple program using g++ test.cpp
To those who use centos and have stumbled upon this post :
$ yum install curl-devel
and when compiling your program example.cpp
, link to the curl library:
$ g++ example.cpp -lcurl -o example
"-o example
" creates the executable example
instead of the default a.out
.
The next line runs example
:
$ ./example