undefined reference to错误,请高手指点
文件1 recursion.h#ifndef RECURSION_H_INCLUDED
#define RECURSION_H_INCLUDED
void showRecursion();
int fact(int j);
#endif // RECURSION_H_INCLUDED
文件2 recursion.c
void showRecursion(){
int i,k,m;
for(i=0;i<5;i++){
k = fact(i);
printf("\40:%d!=%d\n",i,k);
}
m=fact(5);
printf("5!=%d\n",m);
}
int fact(int j){
int s;
if(j==0){
s=1;
}else{
s=j*fact(j-1);
}
return s;
}
文件3 main.c
#include <stdio.h>
#include <stdlib.h>
#include "recursion.h"
int main()
{
showRecursion();
return 0;
}
报undefined reference to 'showRecursion'