|
프로젝트를 만드실때 Win32 Application 이 아닌 Console Project로 만들어보세요.
cuperido
조승희 님이 쓰신 글 :
:
: 안녕하세요 링크에러가 나서요
: 초보인데요
: 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.
:
: 해결좀 해주세요
:
:
:
|