Hello everyone, a question when I try to use the package and compile it in shared form (.so)
and I want to read it I get this:
undefined symbol: _ZN8CryptoPP21SimpleKeyingInterface6SetKeyEPKhmRKNS_14NameValuePairsE
in which I investigate and it says that I have to compile it in such a way that the symbols must be together with the compiled one, I have tried everything to compile it according to the forums and documentations with the command "-g" or "-O2" but I still cannot read the file
My build commands are these:
g++ -DNDEBUG -g -O2 -Wall -Wextra -o node.o node.cpp -l:libcryptopp.a
g++ -shared -o node.so node.o
I would be very grateful for your great help.
Versions install:
libcrypto++6
libcrypto++-utils
libcrypto++-dev
libcrypto++-doc
libcrypto++6-dbg
My code:
File name: node.cpp
`
#include "iostream" // I write it like this since it is not shown on this page
#include "string" // I write it like this since it is not shown on this page
#include "cryptopp/modes.h"
#include "cryptopp/aes.h"
#include "cryptopp/filters.h"
#include "cryptopp/hex.h"
using namespace std;
using namespace CryptoPP;
string node (string text){
string plain = params;
// Our input:
// Note: the input was previously generated by the same cipher
string keyImput = "ABCDEF";
string ivImput = "ABCDF";
string cadenaInput = plain;
}
extern "C" string dencrypnode (string params){
return node(params);
}
int main (){
string keyImput;
string retorno;
std::cout << "\nIngrese llave key : ";
std::cin >> keyImput;
retorno = dencrypnode(keyImput);
std::cout << retorno << std::endl;
return 0;
}
`