Termux-packages: building with gnustl

Created on 28 Oct 2015  路  7Comments  路  Source: termux/termux-packages

you should state somewhere, that you need to link agains "libgnustl_shared" on the device to get a functioning c++ standard library.

Most helpful comment

For anyone finding this in more recent times, Termux has moved to libc++, so you need to compile with: -lc++_shared

All 7 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ILadis picture ILadis  路  3Comments

adit picture adit  路  3Comments

bbtdev picture bbtdev  路  3Comments

am11 picture am11  路  3Comments

newmania picture newmania  路  3Comments