About warning:LNK4089

-- VC++ 2008. 4. 11. 09:24
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

[Q]

Hi, everyone

In release build, I get warning LNK4089, but it didn't occcure in debug mode. The project is MFC, I use it just becasue I want to use Cstring class. My questions are,

1. It this link warning important ? From MSDN help, it doesn't matter much, I think

2.I can get rid of this warning by using option [/IGNORE:4089]. Is this the best method.

3.What's the difference between release/debug mode when this warning happens?

Thank you

[A]
 

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. The detecting is happened in linking time when you set /OPT:REF switch on.

In release build, I get warning LNK4089, but it didn't occcure in debug mode.

LNK4089 didn't occure in debug mode because /OPT:DEF switch of the linker is not set by default.

1. It this link warning important ? From MSDN help, it doesn't matter much, I think

I agree, if this optimization does not generate any runtime error, its not important.

2.I can get rid of this warning by using option [/IGNORE:4089]. Is this the best method.

It depneds on the result of optimization, if it is good, use /IGNORE:4089 is the best way, otherwise, switch of /OPT:REF to get rid of this warning. 

3.What's the difference between release/debug mode when this warning happens?

The difference is if the /OPT:REF is switched on or not.

 

thanks

bite


출처 : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1170586&SiteID=1

'-- VC++' 카테고리의 다른 글

메모리값의 의미  (0) 2008.09.04
serial communications  (0) 2008.05.28
realloc과 new_realloc  (0) 2008.03.25
Graceful shutdown, linger options and socket closure  (0) 2008.03.21
VC 6.0을 쓰지 말아야하는 이유?  (0) 2008.03.17
posted by 어린왕자악꿍