Coder Social home page Coder Social logo

pico_headers's Introduction

pico_headers

A collection of cross-platform single header libraries written in C.

Library Docs Description Version
pico_b64 docs Base64 encoding/decoding library 0.1
pico_ecs docs Pure and simple ECS 2.3
pico_gfx docs Graphics library based on sokol_gfx 0.1
pico_gl docs Graphics library based on OpenGL 0.1
pico_hit docs 2D collision detection (SAT) and ray casting 0.2
pico_log docs Minimal and flexible logging framework 1.0
pico_math docs 2D math library for games 2.0
pico_qt docs A simple quadtree library 1.1
pico_time docs Simple time management library 0.1
pico_unit docs Bare-bones unit testing framework 1.1

These libraries are as-is, however, suggestions for improvements or bug fixes are appreciated. Please raise an issue before submitting a PR with new features. Bug fixes are always welcome!

The API of libraries with versions less than 1.0 are subject to changes without warning. These changes might crash your code or cause other problems. Libraries with versions equal to or greater than 1.0 are more stable and will generally only be changed when adding features or making bug fixes. Changes may still break the API, but will be limited in scope and should not introduce unpredictable behavior at runtime.

The examples and tests compile and run on Linux (GCC), Windows (MSYS2/MinGW64), and MacOS (Clang). The only exception is the Rogue demo, which only compiles/runs on Linux and MacOS.

Most libraries are licensed under your choice of zlib or the public domain. The remaining libraries are licensed under the MIT license.

Deprecated libraries (pico_sat and the old pico_math) can be found here

I give my thanks to Randy Gaul for inspiration, answering my questions, and the template for this project.

pico_headers's People

Contributors

empyreanx avatar ftzpetruska avatar onelumin avatar randygaul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pico_headers's Issues

Tests: compiler cannot be overwritten

Description

The Makefiles present in each test folders do not allow the user to use a different compiler.

Steps to reproduce

Linux:

CC=$(which clang) make

macOS (gcc installed through homebrew):

CC=$(which gcc-11) make

Possible Solution

After testing around in Docker containers, I have noticed that simply removing the definition of CC inside the Makefiles works, because:

  • If any compiler is installed, a cc binary will be added to your path which is a copy of the compiler. make will automatically use it. For example, on Ubuntu, if the user installs clang but not gcc they'd be able to compile it the tests.
  • If the user defines CC themselves such as: CC=/path/to/cross/compiler make, make will use the cross compiler instead of the default.

Additionally, defining the CFLAGS with ?= instead of = allows the user to overwrite the default CFLAGS with their own. In case their compiler does not support one of the options.

Why

Although this may seem like nitpicking, this change would allow a user to cross-compile the tests without editing the Makefile and letting them ensure the headers behave as expected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.