Library built with 7.xx causes warning message in 8.11

Technical Note 20171003



10/3/2017 12:47 PM


Because both the size and the internal encoding of wchar_t are different between IAR Embedded Workbench for Arm version 7.xx and version 8.11 or later, the linker message “Warning [Lt009]: Inconsistent wchar_t size” will be generated when a library built with version 7.xx is used in version 8.11 or later.


In IAR Embedded Workbench for Arm version 7.80 and earlier, the size of wchar_t was two bytes and in version 8.11 the size of wchar_t is four bytes. Moreover the internal encoding of wchar_t objects between these versions objects is different.

This means that combining object files built with versions7.80 and 8.11 will generate a linker warning if the application uses wchar_t, the behavior will be unpredictable. In general, we strongly recommend using object code from one version only, and for a major upgrade such as 7.8 to 8.11, all code should be rebuilt.

If you choose to not to rebuilt, you should at least do following actions:

  • a)    Rebuild an object code build with version 7.xx and written in C++.
  • b)    If the library does include wchar_t, rebuild the library with version 8.11.
  • c)    If a library built with version 7.xx does not include wchar_t, and an application built with version 8.11 (or later) in fact works as expected, you might want to ignore the warning message. To suppress the warning message, do this:
      1. Choose Project>Options>Linker>Diagnostics>
      2. Select Suppress these diagnostics  and specify “Lt009
      3. Click OK.

Note1: If you later add another 7.xx library to your 8.11(or later) project, please remove the suppress diagnostic option described above (“Lt009”) and go through steps a-c again.


A library that uses wchar_t built with IAR Embedded Workbench for Arm version 7.xx must be rebuilt to be used with version 8.11.

© IAR Systems 1995-2021 - All rights reserved.

We use cookies on this website to provide you with a better experience. You need to accept cookies to continue using this site. Cookies