私は何かが欠けているに違いない。libgc を使用した最も単純なテスト プログラムでさえ失敗します。手がかりはありますか?
$ cat test.c
#include <gc/gc.h>
int main(void)
{
char *s;
s = GC_MALLOC(1);
return 0;
}
$ cc -ansi -pedantic -Wall -I/opt/local/include -L/opt/local/lib -o test test.c -lgc
$ ./test
Segmentation fault
Macports とともにインストールされた libgc バージョン 1 を使用しています。