Hi,
I'm relatively new in MCUXpresso projects, I need help with regex in an I.MX RT1050 project.
I tried to include "regex.h" and use regcomp and regexec but when I try to compile the code I have this errors:
- undefined reference to `regcomp'
- undefined reference to `regexec'
Why MCUXpresso find the .h file but it don't find the inplementation of the functions?
Thank you.
Solved! Go to Solution.
Hi @MassimilianoPegaso ,
This is a known issue from the GNU Arm Embedded Toolchain, the regular expression tool is implemented in newlib/libc/posix, but unfortunately posix is not yet enabled or compiled on targets such as arm-none-eabi.
So it's not available at the moment and that's why You won't find it in the C library.
https://answers.launchpad.net/gcc-arm-embedded/+question/208555
I've got a look to all .a provided file as part of toolchain, none of them is promoting 'regcomp' implementation.
Maybe https://github.com/kokke/tiny-regex-c is good solution.
Hope that helps!
Best regards,
Gavin
Hi @MassimilianoPegaso ,
Hope you are doing well!
Could you provide more information about your project environment? Do you base on a demo in SDK? And what is the version number of your SDK / MCUXpresso ?
This information may help us reproduce your issue locally.
Best regards,
Gavin
Hi @Gavin_Jia,
My project is based on sdk example: evkbimxrt1050_mcuboot_opensource. I use MCUXpresso IDE v11.8.0 and SDK_2.x_EVKB-IMXRT1050 v2.14.0.
Thank you, regards.
Hi @MassimilianoPegaso ,
This is a known issue from the GNU Arm Embedded Toolchain, the regular expression tool is implemented in newlib/libc/posix, but unfortunately posix is not yet enabled or compiled on targets such as arm-none-eabi.
So it's not available at the moment and that's why You won't find it in the C library.
https://answers.launchpad.net/gcc-arm-embedded/+question/208555
I've got a look to all .a provided file as part of toolchain, none of them is promoting 'regcomp' implementation.
Maybe https://github.com/kokke/tiny-regex-c is good solution.
Hope that helps!
Best regards,
Gavin