unresolved symbol __imp____iob_func aka SDL 1.25 & Visual Studio 2015

While trying to build something with Visual C++ 2015 Community edition I got this fun error while trying to link:

LNK2019 unresolved external symbol __imp____iob_func referenced in function _ShowError
LNK2019 unresolved external symbol __imp__fprintf referenced in function _ShowError

So it turns out that some of the fundamental streams have changed, and when the SDL library is compiled it attaches LIBC into it, which then creates this fun mis-match.  The fix is easy, of course, just download the source to SDL 1.25, and re-build it with Visual Studio 2015.  But then you’ll get another error that /ZI and /Gy- are incompatible with eachother.  I just changed /ZI to the older /Z7 setting, and I could quickly compile SDL, copy the libs to my project and happily link & run.

This entry was posted in SDL, visual C++ by neozeed. Bookmark the permalink.
avatar

About neozeed

What is there to tell? I've loved UNIX like things since I was first exposed to QNX in highschool (we had the Unisys ICONS!), and spent the better time of my teenage years trying to get my own UNIX... I should have bought Coherent in retrospect.. Anyways latched onto Linux in 1992, and then got some old BSD admin books and have been hooked on the VAX BSD & other big/ancient things since...!

2 thoughts on “unresolved symbol __imp____iob_func aka SDL 1.25 & Visual Studio 2015

  1. Yes but the errors get more confusing and then multiply with their paid-for version.

    What were you building this time?

    • I told it to stop after a few errors otherwise it’ll go on and on and on…

      I wanted to re-build some old MS-DOS stuff with MinGW, but using a new VC which has a nice debugger and profiler built in!

Leave a Reply

Your email address will not be published.

Notify me of followup comments via e-mail. You can also subscribe without commenting.