I want to install the Boehm garbage collector garbage collector on MacOS. I looked at this guide but it did not help; invoking brew install libgc
did nothing. Here is my example code that I am trying to run:
#include <gc/gc.h>
int main() {
void* eight_bytes = GC_MALLOC(8);
}
Unfortunately, I get this error:
Undefined symbols for architecture x86_64:
"_GC_malloc", referenced from:
_main in boehm_invocation-369838.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know of a good way to install this GC without building it from source?