Programming with curlpp 1 about this document
Programming with cURLpp Jean-Philippe Barrette-LaPierre January About this Document This document attempts to describe the general principles and some basic approaches to consider when programming with cURLpp Don ? t forget that cURLpp is a C wrapper of libcurl so cURLpp needs libcurl to be installed already This document will refer to ? the user ? as the person writing the source code that uses cURLpp That would probably be you or someone in a similar position What will be generally refered to as ? the program ? will be the collective source code that you write and that is using cURLpp for transfers The program is outside cURLpp and cURLpp is outside of the program To get more details on all options and functions described herein please refer to their respective man pages You should always have in mind that this is a C wrapper of libcurl It would be unproductive to duplicate libcurl ? s documentation here so this document will show you how to interact with cURLpp but you should read the libcurl programming tutorial which this document is strongly inspired from and the libcurl man pages Building There are many di ?erent ways to build C programs This chapter will assume a unix-style build process If you use a di ?erent build system you can still read this to get general information that may apply to your environment as well Note that cURLpp need libcurl to be already installed C Compiling the Program Your compiler needs to know where cURLpp ? s and libcurl ? s headers are located Therefore you must set your compiler ? s include path to point to the directory where you installed them The ? curlpp- con ?g ? tool can be used to get this information curlpp-con ?g --c ags If pkg-con ?g is installed you can use it this way pkg-con ?g --c ags curlpp But if you ? re using autoconf for your project you can use pkg-con ?g macros See pkg-con ?g man pages for more details Linking the Program with cURLpp When having compiled the program you need to link your object ?les to create a single executable For that to succeed you need to link with cURLpp and possibly also with other libraries that cURLpp itself depends on such as libcurl This may include OpenSSL libraries and even some standard OS libraries may be needed on the command line To ?gure out which ags to use the ? curlpp-con ?g ? tool comes to the rescue once again curlpp-con ?g --libs Again if pkg- con ?g is installed you can use it this way pkg-con ?g --libs curlpp The curlpp-con ?g tool which wraps all functions of curl-con ?g is generated at buildtime on unix-like systems and should be installed with the ? make install ? or similar instruction that installs the library header ?les man pages etc C SSL or Not cURLpp like libcurl can be built and customized in many ways One of
Documents similaires










-
51
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Jul 13, 2021
- Catégorie Administration
- Langue French
- Taille du fichier 105kB