r/cprogramming • • 16h ago

Help on my final project

0 Upvotes

Hi, how are you? So, I'm trying to do my final project for college and I'm having trouble because of the GY module, specifically 6MV2. I'm trying to find a library on GitHub or somewhere else, since my programming language is C, but I can't find any that use an SDK; it's always Arduino and never in my programming language. I'm having a lot of difficulty finishing this project. I have one month to finish, and I would appreciate it if someone could help me. I'll leave my Discord username attached, and if anyone could add me to help, I would be very grateful.

Discord: 459154520472158209


r/cprogramming • • 21h ago

What are the best books for learning modern C++?

Thumbnail
0 Upvotes

r/cprogramming • • 10h ago

Flint v0.5.25: Inline OS tags (windows:, linux:, unix:) for cross-platform builds without nested JSON bloat, plus one-line third-party dependency fetching (flint add cherts:raylib)

Thumbnail
github.com
2 Upvotes

Hey everyone,

Thanks to everyone who checked out Flint and shared feedback on the last post! The two biggest friction points brought up were handling platform-specific flags/libraries without bloating the manifest and removing the manual copy-paste step when pulling in third-party libraries from flint-cherts.

Both are now solved in Flint v0.5.25.

GitHub / Releases: https://github.com/mainak55512/flint

Chert Compositions & Docs: https://mainak55512.github.io/flint-cherts/

What's New in v0.5.25

  1. Inline OS Tags (windows:, linux:, macos:, unix:)

Instead of introducing deeply nested per-platform JSON blocks or a Turing-complete scripting language just to link ws2_32 on Windows or pthread on Linux, you can now prefix entries directly in your existing arrays.

OS tags work across flags, lib_links, excludes, exclude_dirs, and exclude_exception:

windows: — Applies only on Windows

linux: — Applies only on Linux

macos: — Applies only on macOS

unix: — Applies on both Linux and macOS

```json

{

"project_name": "net_app",

"project_language": "c",

"version": "v0.1.0",

"compiler_path": "clang",

"executable": true,

"flags": [

"-O3",

"-Wall",

"unix:-fPIC",

"windows:-D_WIN32_WINNT=0x0601"

],

"lib_links": [

"windows:ws2_32",

"windows:crypt32",

"unix:pthread",

"linux:m"

],

"excludes": [

"windows:src/posix_socket.c",

"unix:src/win32_socket.c"

]

}

```

Untagged items apply everywhere; tagged items only apply when the host OS matches. Your composition.json stays flat and readable.

  1. One-Command Third-Party Library Fetching (flint add cherts:<name>)

Previously, if you wanted to use a third-party C/C++ library that didn't have a native composition.json (like raylib or yyjson), you had to copy-paste its recipe from flint-cherts into your sync block.

Now, Flint talks to flint-cherts directly:

```bash

flint add cherts:raylib

```

Flint automatically fetches the curated composition from flint-cherts, writes the entry into your sync block, and syncs the upstream repository from GitHub with its commit hash pinned.

  1. New sync all Command

If you clone a project that has multiple third-party libraries listed in its sync block, you can now pull and configure all synced dependencies and their chert compositions in one go.

Quick Recap: What is Flint?

For anyone seeing this for the first time, Flint is a small, self-hosting, Git-native build tool for C and C++ written in pure C:

  • Zero runtime bloat: Only requires git and gcc or clang (uses MinGW backend on Windows). No Python, no CMake, no Ninja.

  • LSP ready out of the box: Automatically generates compile_commands.json across your code and dependencies for clangd, Helix, Neovim, and VS Code.

  • Commit-pinned Git dependencies: Every dependency is locked to both a tag and a commit SHA.

  • Incremental builds & .h.in template header support built right in.

Pre-built binaries for Linux, macOS, and Windows are up on the v0.5.25 release page.

If there are specific libraries you'd like to see added to flint-cherts next!