[LLVMdev] C API linking problem
Óscar Fuentes
ofv at wanadoo.es
Tue Sep 15 07:59:13 PDT 2009
"Paul Melis" <llvm at assumetheposition.nl> writes:
> 15:29|melis at juggle2:~/c/llvmpy> gcc -W -Wall -o blah `llvm-config --cflags
> --ldflags --libs all` t.c
> /tmp/ccs4MbKp.o: In function `main':
> t.c:(.text+0x21): undefined reference to `LLVMContextCreate'
> collect2: ld returned 1 exit status
>
> 15:29|melis at juggle2:~/c/llvmpy> nm ~/llvm/lib/libLLVMCore.a | grep
> LLVMContextCreate
> 00001bc0 T LLVMContextCreate
Try this:
gcc t.c -W -Wall -o blah `llvm-config --cflags --libs all --ldflags`
--
Óscar
More information about the llvm-dev
mailing list