본문 바로가기
WORK/Sotfware

LINK : warning LNK4089: 에러 처리

by KANG Stroy 2008. 8. 20.
728x90
728x90

LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF

This is a benign warning, but it is a bit estoteric.  It means that your application linked against shell32.lib (either directly or indirectly though another library) but no functions in shell32.dll were actually called.  See http://msdn2.microsoft.com/en-US/library/bxwfs976(VS.80).aspx.

What does Link warning LNK4089 mean, and how can I avoid it?

This warning simply means that you are linking against a library and the linker has detected that you are not really using any functions from it. This warning usually only pops when you are making release builds, because the /OPT:REF switch of the linker that's set by default on release builds asks the linker to trim your resulting executable as much possible by avoiding linking unnecessary dlls in. (this makes the import address table of your executable much smaller).

If you don't care about the warning, you can tell the linker to ignore it by adding the /IGNORE:4089 switch to the linker command line from the Project->Settings dialog

728x90

댓글