On Thursday, January 24, 2019 at 5:31:07 AM UTC-5, niz al wrote:
>
> 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)
>

$ nm -g libcryptopp.a | c++filt | grep 'RSAFunction('
0000000000000000 W CryptoPP::RSAFunction::RSAFunction()
0000000000000000 W CryptoPP::RSAFunction::RSAFunction()
0000000000000000 W CryptoPP::RSAFunction::~RSAFunction()
0000000000000000 W CryptoPP::RSAFunction::~RSAFunction()
0000000000000000 W CryptoPP::InvertibleRSAFunction::InvertibleRSAFunction()
0000000000000000 W CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000140 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000150 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000160 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
00000000000000c0 W non-virtual thunk to 
CryptoPP::RSAFunction::~RSAFunction()
0000000000000130 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
00000000000000b0 W non-virtual thunk to 
CryptoPP::RSAFunction::~RSAFunction()
0000000000000120 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
00000000000000d0 W virtual thunk to CryptoPP::RSAFunction::~RSAFunction()
0000000000000170 W virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000000 W CryptoPP::RSAFunction::~RSAFunction()
0000000000000000 W CryptoPP::RSAFunction::~RSAFunction()
0000000000000000 W CryptoPP::RSAFunction::~RSAFunction()
0000000000000000 W CryptoPP::InvertibleRSAFunction::InvertibleRSAFunction()
0000000000000000 W CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000000 W CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
00000000000000d0 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000190 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000090 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
00000000000001a0 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
00000000000000b0 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
00000000000001b0 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000100 W non-virtual thunk to 
CryptoPP::RSAFunction::~RSAFunction()
0000000000000070 W non-virtual thunk to 
CryptoPP::RSAFunction::~RSAFunction()
0000000000000020 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000180 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000080 W non-virtual thunk to 
CryptoPP::RSAFunction::~RSAFunction()
00000000000000e0 W non-virtual thunk to 
CryptoPP::RSAFunction::~RSAFunction()
0000000000000070 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000170 W non-virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
0000000000000180 W virtual thunk to CryptoPP::RSAFunction::~RSAFunction()
0000000000000150 W virtual thunk to CryptoPP::RSAFunction::~RSAFunction()
0000000000000040 W virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()
00000000000001c0 W virtual thunk to 
CryptoPP::InvertibleRSAFunction::~InvertibleRSAFunction()

-- 
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