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

use of undeclared identifier 'strchr' #4

Open
bnidia opened this issue Jan 4, 2022 · 1 comment
Open

use of undeclared identifier 'strchr' #4

bnidia opened this issue Jan 4, 2022 · 1 comment

Comments

@bnidia
Copy link

bnidia commented Jan 4, 2022

a@ubuntu:~/ft_printf_intra$ /bin/bash /home/ft_printf_intra/test.sh
➤ Object: obj/source_generator.o
clang++ -std=c++11 -Wall -Wextra -ferror-limit=999 -funroll-loops -Iinc -o obj/source_generator.o -c src/source_generator.cpp
src/source_generator.cpp:52:6: error: use of undeclared identifier 'strchr'
if (strchr("aAeEfFgGcs", convertion))
^
src/source_generator.cpp:54:6: error: use of undeclared identifier 'strchr'
if (strchr("idouxXDOU", convertion))
^
src/source_generator.cpp:102:8: error: use of undeclared identifier 'strchr'
if (!strchr("pcCS", convertion) && padd != NOPADD)
^
3 errors generated.
make: *** [Makefile:192: obj/source_generator.o] Error 1

@OrioPrisco
Copy link

adding the include <cstring> in inc/source-generator.h add the symbol for strchr, and solves the issue

OrioPrisco added a commit to OrioPrisco/printf-unit-test that referenced this issue Jun 21, 2023
this adds the symbol for strchr.
Fixes alelievr#4
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

2 participants