GNU linker or armlink report conflicts between wchar_t types

You see the following errors:

This is because the linker has detected a mismatch between the wchar_t types used. The CodeSourcery document for building Linux applications specifies that wchar_t must be 32 bits.

A similar error exists for incompatible sizes of enumeration types. For ARM Linux, an enum must be 32 bits wide.

To resolve these errors, ensure that all of your code is compiled for 32-bit wchar_t and 32-bit enums, for example using the --wchar32 and --enum_is_int armcc options. This is done automatically if --arm_linux is used.

Alternatively, armlink supports the options --no_strict_wchar_size and --no_strict_enum_size that avoid these errors. Be aware, however, that binary compatibility might be broken between the objects with differing attributes if they pass data of enum or wchar_t types between each other and this might lead to runtime failures.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0483C