Transforming private key into address How do I get to the value in the &#39;scriptPubKey&#39; part of the transaction ? shows a great example of going from address to scriptPubKey.

I'd like to do something similar: go from private key (ECDSA) to address.  How do I do that? References to libs or code, as in the above question, would be appreciated.
From a privatekey (ECC, 32Byte) to an P2PKH address:


Ensure the private key is a valid ECC privat key (libsecp256k1 function)
Calculate the public key from the private key (complex math. function, use a library)
Calculate the RIPEMD160 hash (aka Hash160) from the public key
Do a base58check encoding of the hash160 with a prefix byte 0x00 (for mainnet) or 0x6f for testnet


C code to explore:
https://github.com/libbtc/libbtc/blob/3331ec47ca4ad33e8f2e46e6f01dfbeae090c53d/src/toolfunc.c#L22