Skip to content

Collection of examples in C to show how to get things done in an idiomatic way

License

Notifications You must be signed in to change notification settings

umut-sahin/c-examples

Repository files navigation

C Examples

Various code examples in C to show how to get things done in an idiomatic way

Installing

You need to have a C compiler, which supports the C11 standard, and CMake v3.9 or higher installed in order to run the examples.

Some examples depend on external libraries. Those external libraries' availability are checked by CMake before the build. So if you got a CMake error, it's probably because of a missing library. Anyway, to install run the examples, just clone the repository using the following commands, and you are good to go.

$ git clone https://github.com/umut-sahin/c-examples.git
$ cd c-examples

Building

You can use the following command to build every single example.

$ make build verbose=1

Running a specific example

$ make run target=<example-name>

Also, you can pass arguments like so

$ make run target=<example-name> args="[arguments...]"

Note that there are some examples, which are in the form of a library, therefore, does not come with an executable. For those examples, you may use the test command like so

$ make test target=<example-name>

Available examples

Changelog

See CHANGELOG.

License

This repository is released under MIT license. Please see the LICENSE for further information.

Contributing

Contributions are welcome! Please see CONTRIBUTING for guidance.

Authors

See AUTHORS.

About

Collection of examples in C to show how to get things done in an idiomatic way

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published