README.md (1490B)
1 <!-- 2 Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 4 SPDX-License-Identifier: curl 5 --> 6 7 # libcurl examples 8 9 This directory is for libcurl programming examples. They are meant to show 10 some simple steps on how you can build your own application to take full 11 advantage of libcurl. 12 13 If you end up with other small but still useful example sources, please mail 14 them for submission in future packages and on the website. 15 16 ## Building 17 18 The `Makefile.example` is an example Makefile that could be used to build 19 these examples. Just edit the file according to your system and requirements 20 first. 21 22 Most examples should build fine using a command line like this: 23 24 `curl-config --cc --cflags --libs` -o example-my example.c 25 26 Some compilers do not like having the arguments in this order but instead 27 want you do reorganize them like: 28 29 `curl-config --cc` -o example-my example.c `curl-config --cflags --libs` 30 31 **Please** do not use the `curl.se` site as a test target for your libcurl 32 applications/experiments. Even if some of the examples use that site as a URL 33 at some places, it does not mean that the URLs work or that we expect you to 34 actually torture our website with your tests. Thanks. 35 36 ## Examples 37 38 Each example source code file is designed to be and work stand-alone and 39 rather self-explanatory. The examples may at times lack the level of error 40 checks you need in a real world, but that is then only for the sake of 41 readability: to make the code smaller and easier to follow.