Hello, 

I'am using cryptopp on aarch64 (arm64 architecture system), I'am facing a 
problem when compiling my binary which use cryptopp-7.0.0, the only link 
problem I face is related to RSAFunction, all the other classes worked 
perfectly, here is the program itself which is really a basic one that 
isolate the problem:

#include "cryptopp/rsa.h"
using CryptoPP::RSA;


#include <string.h>
using std::string;

#include <unistd.h>


int main(void)
{
   RSA::PublicKey publicKey;
  return 0;
}


When trying to compile with this command:
~$ toolchain/bin/aarch64-libreelec-linux-gnueabi-g++ cryptopptestfile.cpp -o 
crypttest -L/toolchain/usr/lib -lcryptopp

I got those errors:

cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0x24):
 
undefined reference to `VTT for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0x28):
 
undefined reference to `VTT for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0x38):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0x3c):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0x48):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0x4c):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0x58):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
/tmp/ccppPOOO.o:cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0x5c):
 
more undefined references to `vtable for CryptoPP::RSAFunction' follow
/tmp/ccppPOOO.o: In function `CryptoPP::RSAFunction::RSAFunction()':
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0xb8):
 
undefined reference to `VTT for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionC1Ev[_ZN8CryptoPP11RSAFunctionC1Ev]+0xbc):
 
undefined reference to `VTT for CryptoPP::RSAFunction'
/tmp/ccppPOOO.o: In function `CryptoPP::RSAFunction::~RSAFunction()':
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionD1Ev[_ZN8CryptoPP11RSAFunctionD1Ev]+0x8):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionD1Ev[_ZN8CryptoPP11RSAFunctionD1Ev]+0xc):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionD1Ev[_ZN8CryptoPP11RSAFunctionD1Ev]+0x18):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionD1Ev[_ZN8CryptoPP11RSAFunctionD1Ev]+0x1c):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionD1Ev[_ZN8CryptoPP11RSAFunctionD1Ev]+0x28):
 
undefined reference to `vtable for CryptoPP::RSAFunction'
/tmp/ccppPOOO.o:cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionD1Ev[_ZN8CryptoPP11RSAFunctionD1Ev]+0x2c):
 
more undefined references to `vtable for CryptoPP::RSAFunction' follow
/tmp/ccppPOOO.o: In function `CryptoPP::RSAFunction::~RSAFunction()':
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionD1Ev[_ZN8CryptoPP11RSAFunctionD1Ev]+0x6c):
 
undefined reference to `VTT for CryptoPP::RSAFunction'
cryptopptestfile.cpp:(.text._ZN8CryptoPP11RSAFunctionD1Ev[_ZN8CryptoPP11RSAFunctionD1Ev]+0x70):
 
undefined reference to `VTT for CryptoPP::RSAFunction'
collect2: error: ld returned 1 exit status

This is only related to 
cryptopp::RSAFunction(s)


Thanks for helps,


-- 
You received this message because you are subscribed to "Crypto++ Users". More 
information about Crypto++ and this group is available at 
http://www.cryptopp.com and 
http://groups.google.com/forum/#!forum/cryptopp-users.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to