Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem including regex.h from newlib (IDFGH-1155) #271

Closed
ivanO86 opened this issue Jan 20, 2017 · 5 comments
Closed

Problem including regex.h from newlib (IDFGH-1155) #271

ivanO86 opened this issue Jan 20, 2017 · 5 comments

Comments

@ivanO86
Copy link

ivanO86 commented Jan 20, 2017

Hi,

I am trying to validate some regular expressions and I found the regex library into the newlib include folder. When I try to include this header in my code, I have some unknown type errors:

~/esp-idf/components/newlib/include/regex.h:43:1: error: unknown type name 'off_t'
typedef off_t regoff_t;

Also I have tried to find the regex symbols into the newlib build directory but I couldn't find anything.

Can we use this library? Am I missing any link flags or something like that? I use the time.h and works properly.

Regards.

@negativekelvin
Copy link
Contributor

negativekelvin commented Jan 20, 2017

#include <sys/types.h>

@ivanO86
Copy link
Author

ivanO86 commented Jan 20, 2017

Hi,

thanks for the comment. I have added this header, but I still having problems with the linker.
undefined reference to regcomp' undefined reference to regexec'
undefined reference to regerror' undefined reference to regfree'

I am using this library in my own component and I don't know if I am missing some linker flag, but I cannot find these symbols in the newlib build folder.

regards.

@negativekelvin
Copy link
Contributor

negativekelvin commented Jan 20, 2017

Ah OK sorry don't know if the library was built with that option, probably too bloated. You may want to look at the regex engine from the micropython project.

@FayeY
Copy link
Collaborator

FayeY commented May 2, 2017

Hi ivanO86, is this problem still unsolved?

@HrMitrev
Copy link

I need regex, please, much please add this functionality

@github-actions github-actions bot changed the title Problem including regex.h from newlib Problem including regex.h from newlib (IDFGH-1155) May 14, 2019
espressif-bot pushed a commit that referenced this issue Nov 14, 2019
Adds support of POSIX libs like regex.h

closes #2407
closes #4257
ref #271

Also there are some changes in the toolchain's changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants