블로그 이미지
fiadot_old

칼퇴근을 위한 게임 서버 개발 방법론에 대한 심도있는 고찰 및 성찰을 위한 블로그!

Rss feed Tistory
Technical Article/펌 2005. 8. 25. 15:49

Linker Tools Warning LNK4070 발생시

Linker Tools Warning LNK4070
/OUT:filename directive in .EXP differs from output filename "filename"; ignoring directive

The filename specified in the NAME or LIBRARY statement when the .EXP file was created differs from the output filename that was either assumed by default or specified with the /OUT option.

A client program that uses the resulting DLL might encounter problems.


--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.


DLL을 생성할때 release 모드와 debug모드일때 생성되는 DLL파일명을 다르게 하면 위와같은 경고가 발생한다.

단순 경고라고 무시하면 다른 프로젝트에서 import했을때 에러난다 ㅡㅡ;..

이에 대한 해결방법은

.def파일에 LIBRARY "DLL프로젝트명" 부분을 고쳐줘야 한다.

즉 def파일이 release모드일때와 debug모드일때 2개 있어야만 한다는 얘기...

예를 들여 LIBRARY "FiaAppDLL" 이고
디버그 모드일때는 FiaAppDLLd로 하고싶다면
LIBRARY "FiaAppDLLd" 로 수정하고

프로젝트 셋팅에서 링크탭에 /def:".\FiaAppDLLd.def" 로 수정하면

빌드해도 이상없이 작동한다.

흐흐흐....

아~ 그리고 dll만 바꿀게 아니라 output library명도

/implib:"Library/FiaAppDLLr.lib"

이렇게 바꿔줘야 한다.
,
TOTAL TODAY