you should state somewhere, that you need to link agains "libgnustl_shared" on the device to get a functioning c++ standard library.
Thanks, will probably setup a wiki with this kind of more specialised information (with pages such as Termux for C/C++ developers)!
For information about the C++ library situation on Android, see http://developer.android.com/ndk/guides/cpp-support.html.
Good to read.
Also thx for such a good app ;) .
The -lgnustl_shared flag is no longer necessary - the libgnustl_shared.so library has been put in $PREFIX/lib/libstdc++.so by a symlink, so C++ programs automatically link against that one now.
I don't really get how I am supposed to link the library. Can you do a step by step. I'm new on termux by the way
@amatshiye gnustl is no longer available. Only libc++ is supported.
Thanks for the reply. But I managed to run my c++ project. My naming convention was conflicting with the environment. So now it works, To be honest, it's better than the terminal I have on PC. Awesome App guys.
For anyone finding this in more recent times, Termux has moved to libc++, so you need to compile with: -lc++_shared
Most helpful comment
For anyone finding this in more recent times, Termux has moved to libc++, so you need to compile with: -lc++_shared