~/.../smoking-stop/readline_integration $ gcc main.cpp -o main ld.lld: error: undefined symbol: std::__ndk1::basic_string, std::__ndk1::allocator>::~basic_string() >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(command_generator(char const*, int)) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(main) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(main) >>> referenced 12 more times ld.lld: error: undefined symbol: rl_attempted_completion_over >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(command_completion(char const*, int, int)) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(command_completion(char const*, int, int)) ld.lld: error: undefined symbol: rl_completion_matches >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(command_completion(char const*, int, int)) ld.lld: error: undefined symbol: std::__ndk1::cout >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(main) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(main) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(main) >>> referenced 31 more times ld.lld: error: undefined symbol: rl::get_line(std::__ndk1::basic_string, std::__ndk1::allocator> const&) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(main) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(main) ld.lld: error: undefined symbol: std::__ndk1::basic_string, std::__ndk1::allocator>::__init(char const*, unsigned long) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_string, std::__ndk1::allocator>::basic_string[abi:ne210000]<0>(char const*)) ld.lld: error: undefined symbol: rl_attempted_completion_function >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(rl::set_completer(char** (*)(char const*, int, int))) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(rl::set_completer(char** (*)(char const*, int, int))) ld.lld: error: undefined symbol: read_history >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(rl::load_history(std::__ndk1::basic_string, std::__ndk1::allocator> const&)) ld.lld: error: undefined symbol: add_history >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(rl::add_to_history(std::__ndk1::basic_string, std::__ndk1::allocator> const&)) ld.lld: error: undefined symbol: std::__ndk1::basic_string, std::__ndk1::allocator>::compare(unsigned long, unsigned long, char const*, unsigned long) const >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(bool std::__ndk1::operator==[abi:ne210000], std::__ndk1::allocator>(std::__ndk1::basic_string, std::__ndk1::allocator> const&, char const*)) ld.lld: error: undefined symbol: write_history >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(rl::save_history(std::__ndk1::basic_string, std::__ndk1::allocator> const&)) ld.lld: error: undefined symbol: clear_history >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(rl::cleanup()) ld.lld: error: undefined symbol: __cxa_begin_catch >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(__clang_call_terminate) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_ostream>& std::__ndk1::__put_character_sequence[abi:ne210000]>(std::__ndk1::basic_ostream>&, char const*, unsigned long)) ld.lld: error: undefined symbol: std::terminate() >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(__clang_call_terminate) ld.lld: error: undefined symbol: std::__ndk1::basic_ostream>::sentry::sentry(std::__ndk1::basic_ostream>&) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_ostream>& std::__ndk1::__put_character_sequence[abi:ne210000]>(std::__ndk1::basic_ostream>&, char const*, unsigned long)) ld.lld: error: undefined symbol: std::__ndk1::basic_ostream>::sentry::~sentry() >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_ostream>& std::__ndk1::__put_character_sequence[abi:ne210000]>(std::__ndk1::basic_ostream>&, char const*, unsigned long)) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_ostream>& std::__ndk1::__put_character_sequence[abi:ne210000]>(std::__ndk1::basic_ostream>&, char const*, unsigned long)) ld.lld: error: undefined symbol: std::__ndk1::ios_base::__set_badbit_and_consider_rethrow() >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_ostream>& std::__ndk1::__put_character_sequence[abi:ne210000]>(std::__ndk1::basic_ostream>&, char const*, unsigned long)) ld.lld: error: undefined symbol: __cxa_end_catch >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_ostream>& std::__ndk1::__put_character_sequence[abi:ne210000]>(std::__ndk1::basic_ostream>&, char const*, unsigned long)) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_ostream>& std::__ndk1::__put_character_sequence[abi:ne210000]>(std::__ndk1::basic_ostream>&, char const*, unsigned long)) ld.lld: error: undefined symbol: std::__ndk1::basic_string, std::__ndk1::allocator>::__init(unsigned long, char) >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_string, std::__ndk1::allocator>::basic_string[abi:ne210000](unsigned long, char)) ld.lld: error: undefined symbol: std::__ndk1::ios_base::getloc() const >>> referenced by main.cpp >>> /data/data/com.termux/files/usr/tmp/main-c5970a.o:(std::__ndk1::basic_ios>::widen[abi:ne210000](char) const) ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors) gcc: error: linker command failed with exit code 1 (use -v to see invocation) ~/.../smoking-stop/readline_integration $