The whole point of public key encryption is you cannot generate a public key from a private key, and vice versa.
That's wrong

Of course you can generate a public key from a private key. that's a basic function of a key pair cryptography. that is what SSL/TLS do in a HTTPS communication for example.
if you have a private RSA key, you can generate a public key with PuTTYgen from it. you got a public key generated from the private key. you can not decrypt any encrypted data with the public key, but with the private key.
@fbueller:
thank you very much

the lib is using an ECC-lib for generating an private key and a public key from it. that's exactly what i want and it works

@kjj:
the problem is that i cannot build an private certificate with the private key. i need the public key for that. without the public key openssl will not generate a public key... that's an paradoxon

@Wolf0:
mhh my C skills are very limited. don't know how to compile and use it. is there a compiled executable for windows?