Skip to content
Discussion options

You must be logged in to vote
gcc-12 -std=c99 -c check_unit_tests.c

The safest way is to include the check include directory in your compilation:

gcc-12 -std=c99 -I$(brew --prefix check)/include -c check_unit_tests.c

Many formulae (like check) are also linked into the main Homebrew hierarchy, so including the main Homebrew include directory also works in the general case:

gcc-12 -std=c99 -I$(brew --prefix)/include -c check_unit_tests.c

But some formulae are "keg-only", i.e. they're not linked into the main Homebrew hierarchy on installation. If brew info <formula> says it's keg-only, you'll need to use the first formulation above.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@SMillerDev
Comment options

@dmizhi
Comment options

@gromgit
Comment options

@dmizhi
Comment options

@carlocab
Comment options

Answer selected by dmizhi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants