I am compileing application for ndk, i am getting error "undefined reference to `__errno_location'".
The error comes from a line
sprintf( buff, "%s TIOCMGET failed: %s\n", buff, strerror(errno) );
If I comment this line, the linker does not complain about the same otherwise it does.
I am trying to build my own executable for android using Sourcery G++ Lite's arm-none-linux-gnueabi-gcc tool chain.
From what I can gather, your compiler is referencing a symbol __errno_location
which cannot be found in any of the libraries which the linker is looking at.
This suggests that either:
If the header doesn't match the library then symbols can have the wrong name and so you can get such link errors.
It appears that you're including the compilers' LibC headers and then linking against the android library which might not always work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With