Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] error: use of undeclared identifier 'strtouq' / 'strtoq' #1803

@JMLX42

Description

@JMLX42

Description

Trying to compile PCRE 8.45, I got the following error:

  1. error: use of undeclared identifier 'strtoq'
  2. error: use of undeclared identifier 'strtouq'

Here is the complete command line:

/opt/android-ndk-linux/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi21 --sysroot=/opt/android-ndk-linux/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DHAVE_CONFIG_H -I/srv/embedb/build/third_party/pcre/src/pcre-build -I/srv/embedb/build/third_party/pcre/src/pcre -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security   -fPIC -MD -MT CMakeFiles/pcrecpp.dir/pcrecpp.cc.o -MF CMakeFiles/pcrecpp.dir/pcrecpp.cc.o.d -o CMakeFiles/pcrecpp.dir/pcrecpp.cc.o -c /srv/embedb/build/third_party/pcre/src/pcre/pcrecpp.cc
/srv/embedb/build/third_party/pcre/src/pcre/pcrecpp.cc:885:17: error: use of undeclared identifier 'strtoq'; did you mean 'strtol'?
  long long r = strtoq(str, &end, radix);
                ^~~~~~
                strtol
/opt/android-ndk-linux/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:91:6: note: 'strtol' declared here
long strtol(const char* __s, char** __end_ptr, int __base);
     ^
/srv/embedb/build/third_party/pcre/src/pcre/pcrecpp.cc:917:26: error: use of undeclared identifier 'strtouq'; did you mean 'strtoul'?
  unsigned long long r = strtouq(str, &end, radix);
                         ^~~~~~~
                         strtoul
/opt/android-ndk-linux/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:93:15: note: 'strtoul' declared here
unsigned long strtoul(const char* __s, char** __end_ptr, int __base);
              ^
2 errors generated.

Affected versions

r23, r24, r25

Canary version

No response

Host OS

Linux

Host OS version

Ubuntu 20.04

Affected ABIs

armeabi-v7a

Build system

CMake

Other build system

No response

minSdkVersion

19

Device API level

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions