一个red hat 9下的C程序出现错误
清华大学出版社出版的《GNU/Linux编程指南》第3章的一个程序如下:
/*
*helper.c -Helper code for howdy.c
*/
#include <stdio.h>
void msg(void)
{
printf("This sent from Jupiter.\n");
}
/*
* helper.h -Header for helper.c
*/
void msg(void)
/*
*howdy.c - Modifed "Hello,World!" program
*/
#include <stdio.h>
#include "helper.h"
int main(void)
{
printf("Hello,Linux programming world!\n");
msg();
return 0;
}
编绎命令为gcc howdy.c helper.c -o howdy
编绎提示为 main函数的第一个在括号前不能正确解释,和msg函数有误。
请教高手,是哪里出了问题?在线等待解答!