9 months ago.

_impure_ptr and __locale_ctype_ptr undefined

Hi,

I am trying to link a library built with arm-none-eabi-gcc with ARMC6 under MBed Studio. During link time I have _locale_ctype_ptr and _impure_ptr which are undefined.

After googling them It looks like they are coming from the newlib used by gcc.

Is there any chance to have armcc linking with this library ?

how was the library compiled? Looks like does not use compatible ABI . Can you recompile the lib?

posted by Martin Kojtal 21 Mar 2019

The GCC lib has been compiled with arm-none-eabi-gcc Martin.

posted by Damien Laidin 21 Mar 2019

1 Answer

8 months, 3 weeks ago.

Hi!

Unfortunately linking to a library built with GCC_ARM using a different compiler is not a supported method. If the library is not using a compatible ABI I would recommend either recompiling the library in ARMC6, or compile your application using GCC_ARM.

Mbed CLI by default will install the GCC_ARM toolchain as the default compiler:

https://os.mbed.com/docs/mbed-os/v5.11/tools/installation-and-setup.html