gcc编译带自定义头文件问题
helper.h是helper.c的头文件,test.c引用了helper.c的msg方法
/*helper.c*/#include <stdio.h>#include <stdlib.h>void msg(void){ printf("hello world.\n");}
/*helper.h*/void msg(void)
/*test.c*/#include "helper.h"int main(void){ msg(); return 0;}
#ifndef _HELPER_H_#define _HELPER_H_/*helper.h*/void msg(void);#endif