使用#inlucde "" 编译出错!!!
两个文件:主文件: a1.c
#include <stdio.h>
#include "a2.c"
int main(void)
{
printf("print a1.c");
return 0;
}
另外一个文件: a2.c
void test(void)
{
printf("a2.c");
}
编译出错:
f:\test\abc\a2.c||In function `test':|
f:\test\abc\a2.c|3|warning: implicit declaration of function `printf'|
obj\Debug\a1.o||In function `test':|
f:\test\abc\a2.c|2|multiple definition of `_test'|
obj\Debug\a2.o:f:\test\abc\a2.c|2|first defined here|
||=== Build finished: 2 errors, 1 warnings ===|
请怎么回事??