|
안녕하세요 링크에러가 나서요
초보인데요
myfun.h=====================================
#include <stdio.h>
void sum();
void mul();
extern int i, j;
extern int x, y;
extern int res;
sample1.c==================================
#include <stdio.h>
#include "myfun.h"
int res;
void main()
{
sum();
}
sample2.c================================
#include "myfun.h"
int i=10, j=10;
void sum()
{
res = i + j;
printf("res = i + j ==> %d\n", res);
mul();
}
sample3.c================================
#include "myfun.h"
int x=20, y=20;
void mul()
{
res = x * y;
printf("res = i * j ==> %d\n", res);
}
컴파일은 되는데 링크에러가 다음과 같이 나옵니다
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Terran.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
해결좀 해주세요
|