vendredi 14 juillet 2017

Adding a c++ library and building NS3 using waf [duplicate]

I am trying to include

openssl/sha.h 

and using

SHA256

in NS3 using waf. I have

libssl

and

libssl-dev

installed on my system.

But when I use the any of the functions from the library

SHA256_INIT(&sha256);
SHA256_Update(&sha256, str.c_str(), str.size());
SHA256_Final(hash, &sha256);

I get an error

undefined reference to SHA256_Init' undefined reference toSHA256_Update' undefined reference to `SHA256_Final'

Normall to build a cpp file, I would use

-lcrypto

as an argument, but when i am using waf, I am unable to build it.

How should I add these dependencies to my waf, or to the application wscript to be able to build this correctly.

Aucun commentaire:

Enregistrer un commentaire