4

I am getting the

LNK2019 unresolved external symbol __iob_func referenced in function _usb_parse_configuration

after updating to VS 2015 and looking at the Microsoft Breaking Changes i can't find a solution. I've had more external symbol errors but most of the got solved by using the legacy library, this one stays. I have extern "C" defined in a lot of files, changing that gives only way more errors.

Did you guys have a problem with that and how did you solve it? Any help is appreciated

Tomaz Leopold
  • 75
  • 1
  • 9
  • Possible duplicate of [unresolved external symbol \_\_imp\_\_fprintf and \_\_imp\_\_\_\_iob\_func, SDL2](https://stackoverflow.com/questions/30412951/unresolved-external-symbol-imp-fprintf-and-imp-iob-func-sdl2) – PaulF Sep 25 '17 at 09:09
  • Checked the post but none of the solutions worked. – Tomaz Leopold Sep 25 '17 at 09:31
  • Which of the solutions have you tried? – PaulF Sep 25 '17 at 09:38
  • #define stdin (__acrt_iob_func(0)) Those are not defined anywhere, i tried redefining it as @smartsl recommended (currently have extern "C" {) but it did not help – Tomaz Leopold Sep 25 '17 at 09:50
  • 1
    It is a universal link error, you get it when the #include files you used (like stdio.h) do not match the .lib files you link (like msvcrtd.lib). Tends to happen when you use somebody else's library, nothing you can do but ask him for an update. – Hans Passant Sep 25 '17 at 09:54
  • See this - which is referred to in the last but one answer in the link I gave : https://msdn.microsoft.com/en-us/library/bb531344.aspx#BK_CRT - scroll down to the _" and "_ section. – PaulF Sep 25 '17 at 09:57
  • I have the source code of the "external" library i use, stdio is included in some of those files. @PaulF i did check the link beforehand, i'm kind of confused with "recompile static libraries" and encapsulating. I don't know what exactly to do with that information – Tomaz Leopold Sep 25 '17 at 10:15
  • 1
    Firstly - make sure that your project is using the correct libs - make sure paths in your project for standard libraries refer to VS2015 folders not your old compiler folders. _"recompile static libraries"_ : if your project creates it's own libraries for which you have the source code - make sure the settings for the library are updated for VS2015 & recompile & ensure you link those libs. Encapsulating : you create a new library project with your old compiler & link the old standard libraries into that library - you can then use that library in VS2015 as it contains the required functions. – PaulF Sep 25 '17 at 10:44
  • 1
    Note - with the encapsulated library - you may need to add export definitions for all functions you require from the original library. – PaulF Sep 25 '17 at 10:45

0 Answers0