Archived

This topic is now archived and is closed to further replies.

myiope

Linker warning

Recommended Posts

I''m trying to make a DirectX 8 game, but when I build my program using the default Win32 Release configuration, it gives me the following linker warning: LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF This doesn''t happen when I build in the debug configuration. Can anyone explain what this means and how to fix the problem? Thanks.

Share this post


Link to post
Share on other sites
You can look up errors/warnings in the MSDN library!

Linker Tools Warning LNK4089
all references to "dynamic-link library" discarded by /OPT:REF

The linker discarded all packaged functions that referenced exports in dynamic-link library. As a result, dynamic-link library and its import library are unneeded.

Andy.


Share this post


Link to post
Share on other sites
I did look up this warning on MSDN but that answer didn''t help me too much. I still don''t know what it means exactly. More specifically, is this a bad thing? Since it is a "warning", shouldn''t some action be taken to correct whatever the problem is? If so, what can I do about it?

Thanks for your help.

Share this post


Link to post
Share on other sites
Andy just told you.

It means that you are not using any fonction from that dll, so it won''t link with lib.

You only see that in release mode because it is an optimization : Useless code is removed.

You don''t see it in debug because they keep everything you told it to compile.

It is not bad. It doesn''t affect you. If you still want to remove the warning, you only need to figure out wich .lib file is related to ADVAPI32.dll(probably ADVAPI32.lib) and remove it from the link tab in your project settings.

Share this post


Link to post
Share on other sites
this is a bug or something. i have this problem too and if i remove the .lib my program no longer compiles. so i just ignore it.


life is unfair, take advantage of it.
UNMB2 - if the link doesn''t work, try clicking it

Share this post


Link to post
Share on other sites