Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about required feature test macros #78

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ As mentioned above, there are two options:
1. Copy (or `git submodule`) `termbox2.h` into your C project. As normal,
include the header file wherever you want to use `tb_*` functions, but also
be sure to `#define TB_IMPL` in exactly one of your source files. (This is a
common pattern for single file header libraries.)
common pattern for single file header libraries.) Ensure that feature test
macros `_DEFAULT_SOURCE` and `_XOPEN_SOURCE` are defined (either by defining
them via compiler flags or including `termbox2.h` first[^1]).
2. Build termbox2 as a library (either `make libtermbox2.so` or
`make libtermbox2.a`) and link as normal. Make sure the compile-time options
remain the same for libtermbox2 and your application. (Alternatively, build
Expand Down Expand Up @@ -121,3 +123,5 @@ Other wrapper libraries:
* [matrix-tui](https://github.com/git-bruh/matrix-tui) - Matrix client
* [Vgmi](https://github.com/RealMelkor/Vgmi) - Gemini client
* [poe](https://sr.ht/~strahinja/poe/) - `.po` file editor

[^1]: See https://github.com/termbox/termbox2/pull/75#issuecomment-2252242269
Loading