C libbrotli build instructions in readme or documentation #309

Open
opened 2026-01-29 20:41:44 +00:00 by claunia · 1 comment
Owner

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

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
Author
Owner

@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 -lbrotli flag 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.

@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 `-lbrotli` flag 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#309