mirror of
https://github.com/google/brotli.git
synced 2026-09-23 07:05:31 +00:00
C libbrotli build instructions in readme or documentation #309
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lvandeve on GitHub (Feb 10, 2020).
It'd be useful to have instructions on how to include and link against libbrotli from C/C++:
the includes are: #include <brotli/decode.h> and #include <brotli/encode.h>
The linker flags are: -lbrotlidec -lbrotlienc (and not -lbrotli as might be one's first guess)
It also may be useful to check if pkg-config is supported
@maddsua commented on GitHub (Jan 27, 2023):
By the way, if you not feeling like linking program dynamically to brotli dll's, nobody stops you from building a static libbrotli.a and using
-lbrotliflag to link to it. The makefile would look like "compile all you can find here to objects and put it all together".Someone might find it helpful, especially the beginners.