Programming/Visual Studio

error LNK2019 fatal, error LNK1120

시그v 2010. 1. 13. 23:30

 

참고  <http://edible.egloos.com/1240411>
LNK2019, LNK1120 Error 발생이유...

1. 헤더를 include 하고 프로젝트에 헤더 .cpp 포함하지 않을 경우...

2. .h .cpp 함수원형 함수호출을 해놓고 정작 함수 구현을 했을 경우...

3. .c .cpp 프로젝트에서 같이 사용할 .h include하고 .cpp include 하지 않을 경우...


 ===============================

-aaa.h-

void CheckLNK2019(int ntest);

-aaa.cpp-

void LNK2019Test() {

CheckLNK2019(nTemp);

}

===============================



< 내가 실수한 부분 >
-test.h-

class test

{

void CheckLNK2019(int ntest);

};

-test.cpp-

void test::LNK2019Test() {       test:: =>이걸 빼먹었다;;;

            (생략)

}