build project meet "undefined reference to `__SEGGER_RTL_X_locale_name_buffer' " error

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • build project meet "undefined reference to `__SEGGER_RTL_X_locale_name_buffer' " error

      Hi,
      Now I need to use harfbuzz lib in my project.
      when I use function "hb_buffer_guess_segment_properties( buffer)"
      building project report bellow error:

      Source Code

      1. Building ‘freetype_checklist_example’ from solution ‘freetype_checklist_example’ in configuration ‘Debug’
      2. 5> Compiling ‘custom_fonts.c’
      3. 9> Compiling ‘lv_txt_hb.c’
      4. 6> Compiling ‘lv_label.c’
      5. 1> Linking freetype_checklist_example.elf
      6. 1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.60/gcc/arm-none-eabi/bin/ld: C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.60/segger-rtl/libs/libc_v8mml_fpv5_sp_d16_hard_t_le_eabi_balanced.a(mbops.o): in function `setlocale':
      7. 1> mbops.c:(.text.libc.setlocale+0x8): undefined reference to `__SEGGER_RTL_X_locale_name_buffer'
      8. 1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.60/gcc/arm-none-eabi/bin/ld: mbops.c:(.text.libc.setlocale+0x14): undefined reference to `__SEGGER_RTL_X_locale_name_buffer'
      9. 1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.60/gcc/arm-none-eabi/bin/ld: mbops.c:(.text.libc.setlocale+0x68): undefined reference to `__SEGGER_RTL_X_locale_name_buffer'
      10. 1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.60/gcc/arm-none-eabi/bin/ld: mbops.c:(.text.libc.setlocale+0x6c): undefined reference to `__SEGGER_RTL_X_locale_name_buffer'
      11. 1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.60/gcc/arm-none-eabi/bin/ld: C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.60/segger-rtl/libs/libc_v8mml_fpv5_sp_d16_hard_t_le_eabi_balanced.a(mbops.o): in function `__SEGGER_RTL_set_locale':
      12. 1> mbops.c:(.text.libc.__SEGGER_RTL_set_locale+0x64): undefined reference to `__SEGGER_RTL_X_locale_name_buffer'
      13. 1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.60/gcc/arm-none-eabi/bin/ld: C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.60/segger-rtl/libs/libc_v8mml_fpv5_sp_d16_hard_t_le_eabi_balanced.a(mbops.o):mbops.c:(.text.libc.__SEGGER_RTL_set_locale+0x68): more undefined references to `__SEGGER_RTL_X_locale_name_buffer' follow
      14. Build failed
      Display All
      Can you help me take a look at this issue?
      for hardware reason, we now use SEGGER Embedded Studio for ARM 5.60.
      Thanks!
    • I wonder why no Segger staff had picked up this thread yet ...
      I'm using SES mostly for casual projects, and certainly not such old version.

      But the linker error points to a function supposed to be in Segger's runtime library.
      If you set up the project with the "wizard", the libraries are selected according the selected MCU variant, and certain other settings like semi-hosting or RTT support.
      The wizard also selects matching device header and CMSIS version/paths, and startup code.
      You didn't replace these components (headers, CMSIS, startup) with your own versions, did you ?

      > ...in function `setlocale': ...


      But I suppose this is the point of contention - setlocale() is a POSIX-conformant function, most probably introduced by your harfbuzz lib.
      Very little of this POSIX compatible OS code exists on this MCU level (and in the Segger libs automatically included), sou you might need to review the requirements for using this library in your environment.