{"slug": "c-and-c-precompiled-dependencies-using-conan", "title": "C (and C++*) precompiled dependencies using Conan", "summary": "Conan, the C/C++ package manager, now supports precompiled dependencies via its integration with Zig's build system, allowing C and C++ projects to use prebuilt binaries through Conan Center Index. The packages are built with libc++ on macOS, libstdc++11 on Linux, and MSVC on Windows, with users able to recompile locally for different configurations. The feature is tested in the PR's test suite and is expected to be a valid workflow for C/C++ projects.", "body_md": "Thanks!\n\n- How does conan maintain ABI compatiblity? What libc and libstdc++ are the prebuilt binaries compiled against?\n\nPackages are generated following a profile, and locally/in a CI those can be set to use whatever the project requires. For C++, the canonical repository for dependencies (Conan Center Index) builds them with `libc++`\n\nin Macos, `libstdc++11`\n\nin Linux , and msvc’s in Windows, but users are able to re-compile locally if different configurations are desired.\n\nIs this meant to be only used with zig programs? Build.zig can also be used by C/C++ projects.\n\nThis would in fact be able to be used by C/C++ projects too, yes. The idea would be similar and this is tested in the test suite for the PR, so we expect this to be a valid workflow too\n\nI found the comment on a PR in conan repo very hard to read, as it seemed mostly a dump from a LLM.\n\nYes, as the implementation is not final, not much time was provided to have solid wording in the examples/docs, with the expectation that things might change before being merged. I have updated the main post with a full example so that reading it is not required to see it working, let me know if that helps", "url": "https://wpnews.pro/news/c-and-c-precompiled-dependencies-using-conan", "canonical_source": "https://ziggit.dev/t/c-and-c-precompiled-dependencies-using-conan/17401#post_3", "published_at": "2026-08-28 09:34:26+00:00", "updated_at": "2026-08-28 09:48:38.973712+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Conan", "Conan Center Index", "Zig"], "alternates": {"html": "https://wpnews.pro/news/c-and-c-precompiled-dependencies-using-conan", "markdown": "https://wpnews.pro/news/c-and-c-precompiled-dependencies-using-conan.md", "text": "https://wpnews.pro/news/c-and-c-precompiled-dependencies-using-conan.txt", "jsonld": "https://wpnews.pro/news/c-and-c-precompiled-dependencies-using-conan.jsonld"}}