목록lnk2005 (1)
루토's sssssstory
Error LNK2005 : _DllMain@12 already defined
Error LNK2005 : _DllMain@12 already defined cpp파일 내에서 DllMain 함수를 직접 구현하여 사용할 때 CString 등을 위해서 afx.h 를 include 시키게 되면 발생하는 에러이다. 일반적으로 이 LNK2005 에러는 다른 라이브러리 내에 DllMain이 포함되어 있는 경우에는 http://support.microsoft.com/kb/148652 에서 지시하는 대로 해결을 할 수가 있지만 cpp 파일내에서 DllMain을 직접 구현하여 사용할 경우에는 해당이 되질 않는다. 하지만 CString은 써야겠고... 이럴 때에는 afx.h 를 include시키지 말고 atlstr.h를 include시켜 사용하면 해결 할 수 있다. // #include #inclu..
Development/C & C++
2007. 4. 28. 09:55