[LLVMdev] How to explain this weird phenomenon????????

Duncan Sands
Tue, 10 Apr 2012 13:03:00 -0000

Hi 15102925731,

> But when I link the two objective file, it said
> "hello.o: In function `main':
> hello.bc:(.text+0x69): undefined reference to `check'
> clang: error: linker command failed with exit code 1 (use -v to see
invocation)"
> What's wrong??
...
> declare i32 @check()
...
> *The original check.c file*
> #include <stdio.h>
> void print()

Should be called check not print.

> {
> printf("Check function works!\n");
> }

Ciao, Duncan.