Jump to content
  • Advertisement

Archived

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

tototam

compiler error

This topic is 5225 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

LINK : warning LNK4089: all references to "GDI32.dll" discarded by /OPT:REF how to fix that?

Share this post


Link to post
Share on other sites
Advertisement
FIRST let me tell you that your compiler provide help about each and every warning and error messages it display. That should be the first thing you check.

This is a warning telling you that, even though you are linking to "GDI32.dll", you are not using any of its functions and, therefore, the linker has dropped it from the list of linked libraries (an optimization triggered by the /OPT:REF linker flag).

You can ''fix'' it by either
* Using functions from that library.
* Disabling the optimization (probably a bad idea).
* Disabling warning 4089 with #pragma warning(disable: 4089) (syntax may be incorrect, check your doc)
* Removing the library from the list of libraries you need.
* Use a different compiler.

Or just ignore it. Which is what I would do.

Have a nice day.


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
— Brian W. Kernighan

Share this post


Link to post
Share on other sites
That's not a compiler error; that's a linker warning.

As warnings go it's relatively benign, but to fix just don' use /OPT:REF when you link.

edit: bah. Fruny beat me to it.

[edited by - SiCrane on June 5, 2004 11:43:22 PM]

Share this post


Link to post
Share on other sites
Ahh, I would not disable the optimisation actually but do what the replies suggest and just remove the library since its not in use - otherwise just ignore it, its not harming your executable but disableing the optimisation may make your executable larger depending on the compiler.

[edited by - PantherBoy on June 6, 2004 3:54:53 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!