Programmers that use other languages tend to think C and C++ don't have a lot of library or module support to help develop applications. While these languages don't have a lot of built-in support for a wide variety of functionality and they don't have an official way to add packages, modules, libraries or other forms of additional code, they still have a wide selection of third party code and libraries you can use to help perform tasks faster.

I personally prefer that C has a minimal library and you don't have to memorize a lot of functionality to get it running. I also like the fact that C/C++ lets you choose options for yourself instead of forcing you to use them. For instance, someone may want to use garbage collection and not deal with memory management. If so, there are libraries out there that can do it for you. However, when I want to write something that runs fast, I'd prefer to do my own memory management. Also, most of those higher level languages that programmers are so enthusiastic about because they have libraries to make tasks easier are usually written in C/C++. Some of the high performance libraries these languages use or the functionality that needs to access operating system related functions (like file management) typically use C/C++ code underneath. For instance, higher level languages that support Internet access are probably using a C library such as curl behind the scenes.

Not having an official version of some functionality that's part of a standard library can make it hard to figure out how best to add that functionality to a project. While there are tons of libraries available for C, not having a language specific way to easily add them as packages can make it confusing as to what use. There is an interesting development in C/C++ programming that's attempting to fill the gap. Several developers are coming up with lightweight and, in some cases, single file or single header libraries with lenient licensing that can easily be added to a project. I'll mention some of those options. If there are others you find useful, please let me know about them so they can be added to the list.

There is a lightweight package manager for C/C++ called clib that makes it easier to find and incorporate lightweight libraries in your projects. It includes a list of available packages:
https://github.com/clibs/clib/wiki/Packages

CCAN is another collection of C snippets similar to the CPAN collection:
http://ccodearchive.net/list.html

Snippets has been around a long time. It has short snippets of code that give examples on how to do things in C/C++. It's a useful resource.
https://github.com/vonj/snippets.org

Libraries that use Unlicense, CC0, BSD 0 clause (or other similar licenses) or code that is in the public domain is very easy to incorporate into projects. You don't have to worry about whether you've given proper credit in your program or provided the proper license information along with your own application. The Unlicense site has a nice list of source code you can use by itself or incorporate in your own projects. Some of the code listed is written for C/C++. There are also some interesting C/C++ projects at github in the public-domain projects.
http://unlicense.org/
https://github.com/public-domain?tab=repositories

Projects from Plan 9 and suckless.org are known for their efficiency and minimalism. You can check out some of that code at:
http://git.suckless.org/

micro-bunzip code is available from:
http://www.landley.net/code/

What follows is a list of single file and lightweight libraries:
https://github.com/nothings/stb
https://github.com/nothings/single_file_libs
https://github.com/yui0/slibs
https://github.com/mackron/dr_libs
https://github.com/RandyGaul/cute_headers
https://github.com/mattiasgustavsson/libs
https://github.com/pennie-quinn/paq
https://github.com/gingerBill/gb
https://github.com/to-miz/tm
https://github.com/r-lyeh/tinybits
https://github.com/tylov/C99Containers
https://github.com/nemequ/portable-snippets
https://github.com/floooh/sokol
https://github.com/hidefromkgb/mac_load
https://github.com/lvandeve/lodepng
https://github.com/rgamble/libcsv
https://github.com/rgamble/csvutils
https://github.com/arnoldrobbins/strftime
https://github.com/curl/fcurl

Know of some others worth trying? Please tell me about them:
https://groups.yahoo.com/groups/CppDesign/

April 2025

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2025 01:02 am
Powered by Dreamwidth Studios