Jump to content
  • Advertisement
Sign in to follow this  
isenthalpic53

LNK2019

This topic is 3603 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

Not sure if this is an inappropriate place to put this question. I have been trying to add jpeg loading code to an MFC application in Visual Studio 2005. I'm not sure if I'm linking in a bad order or using improper compiler options, etc. I've been poking around for well over an hour, I'm sure this is something minor, but when I add my texture loading code, which uses jpeg.lib, I get the following error:
Quote:
1>jpeg.lib(jerror.obj) : error LNK2019: unresolved external symbol __iob referenced in function _output_message 1>.\Debug/Viewer.exe : fatal error LNK1120: 1 unresolved externals
Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
I quick google search of "__iob" gives good result. I had this problem (not the same function and not the same libraries though) a while ago. Your jpeg.lib was compiled using a static build under a older version of VS, and you try to compile your executable with multi-threaded runtimes libraries (you know the /MT /MD switchs, and the libcp.lib/libcmt.lib libraries). I'm no expert with those, and I don't know if there's a easy way to fix your problem so I won't try to say shit i'm not sure about, but what I'm sure is that if you could recompile jpeg.lib using VS2005/2008 it would probably be ok afterward. Or compile your own project with an older version of VS, but I wouldn't recommend that.

Share this post


Link to post
Share on other sites
I recompiled the jpeg.lib with VS 2005. I could build the application if I statically linked to MFC, but that inflated my binary to 3 MB, up from about 200KB.

If anyone's interested, I've included the updated .h and .lib files here:

http://www.yourfilehost.com/media.ph...eglib_VS2005.h
http://www.yourfilehost.com/media.ph...peg_VS2005.lib

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!