I'm not sure where you're getting the undefined symbol error, but you'll get an undefined reference error if you call a function that doesn't exist.
Code:
itsme@dreams:~/C$ cat bad.c
int main(void)
{
foo();
return 0;
}
itsme@dreams:~/C$ gcc -Wall bad.c -o bad
bad.c: In function `main':
bad.c:3: warning: implicit declaration of function `foo'
/tmp/ccGWEcsx.o: In function `main':
/tmp/ccGWEcsx.o(.text+0x7): undefined reference to `foo'
collect2: ld returned 1 exit status
itsme@dreams:~/C$