新手学习 求助 编译出错
/*
*File: PART2.c
*/
#include <stdio.h>
#include "genlib.h"
#include "simpio.h"
main()
{
double a,b,c;
printf("Enter a:");
a=GetReal();
printf("Enter b:");
b=GetReal();
c=(a+b)/2;
printf("c=%g\n",c);
}
编译的时候出错
/tmp/cciCYeo3.o: In function `main':
PART2.c:(.text+0x17): undefined reference to `GetReal'
PART2.c:(.text+0x2d): undefined reference to `GetReal'
collect2: ld 返回 1
GCC 用-Wall 看了下警告 说是返回类型默认int 但不知道该如何更改呢
我看的书是C语言的科学和艺术