lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | _ _ ____ _ |
| 2 | ___| | | | _ \| | |
| 3 | / __| | | | |_) | | |
| 4 | | (__| |_| | _ <| |___ |
| 5 | \___|\___/|_| \_\_____| |
| 6 | |
| 7 | This directory is for libcurl programming examples. They are meant to show |
| 8 | some simple steps on how you can build your own application to take full |
| 9 | advantage of libcurl. |
| 10 | |
| 11 | If you end up with other small but still useful example sources, please mail |
| 12 | them for submission in future packages and on the web site. |
| 13 | |
| 14 | BUILDING |
| 15 | |
| 16 | The Makefile.example is an example makefile that could be used to build these |
| 17 | examples. Just edit the file according to your system and requirements first. |
| 18 | |
| 19 | Most examples should build fine using a command line like this: |
| 20 | |
| 21 | $ `curl-config --cc --cflags --libs` -o example example.c |
| 22 | |
| 23 | Some compilers don't like having the arguments in this order but instead |
| 24 | want you do reorganize them like: |
| 25 | |
| 26 | $ `curl-config --cc` -o example example.c `curl-config --cflags --libs` |
| 27 | |
| 28 | *PLEASE* do not use the curl.haxx.se site as a test target for your libcurl |
| 29 | applications/experiments. Even if some of the examples use that site as a URL |
| 30 | at some places, it doesn't mean that the URLs work or that we expect you to |
| 31 | actually torture our web site with your tests! Thanks. |
| 32 | |
| 33 | EXAMPLES |
| 34 | |
| 35 | Each example source code file is designed to be and work stand-alone and |
| 36 | rather self-explanatory. The examples may at times lack the level of error |
| 37 | checks you need in a real world, but that is then only for the sake of |
| 38 | readability: to make the code smaller and easier to follow. |