Sample1.c
#include "stdio.h"
int f1(int x, int y)
{
printf("%d %d", x, y);
return x+y;
}
Run Code Online (Sandbox Code Playgroud)
Sample2.c
#include "stdio.h"
extern int f1(int x,int y);
int main(void)
{
printf(" %d\n", f1(5,6));
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我试图在Turbo C/C++编译器(Windows XP)上编译该Sample1.c文件Sample2.c.它显示以下错误:
Compiling Sample2.c:
Linking Sample2.exe:
Linker Error : Undefined Symbol _f1 in module Sample2.c
Run Code Online (Sandbox Code Playgroud)
有人可以帮我这方面吗?