Hi there, In order to compile a .cpp source code file using the cryptopp library can it be done by just using one gcc on the command line or does a makefile need to be used? The only #includes I am using are hmac.h and sha.h.
I am using version 552 of cryptopp. I am using Linux on Ubuntu with: gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7). Does the libcryptopp.a file need to be added in somewhere as an argument. What would the command line argument look like for me to compile my code that uses the hmac.h and sha.h? If I use the command : gcc auth.cpp -o authentication I get this one huge error message and this is the end of the error message: nt, CryptoPP::HashTransformation>::TruncatedFinal(unsigned char*, unsigned int)' /tmp/ccplhGBR.o: (.rodata._ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[vtable for CryptoPP::IteratedHash<unsigned int, CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>, 64u, CryptoPP::HashTransformation>]+0x4c): undefined reference to `CryptoPP::HashTransformation::TruncatedVerify(unsigned char const*, unsigned int)' /tmp/ccplhGBR.o: (.rodata._ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[vtable for CryptoPP::IteratedHash<unsigned int, CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>, 64u, CryptoPP::HashTransformation>]+0x54): undefined reference to `__cxa_pure_virtual' /tmp/ccplhGBR.o: (.rodata._ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[vtable for CryptoPP::IteratedHash<unsigned int, CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>, 64u, CryptoPP::HashTransformation>]+0x5c): undefined reference to `__cxa_pure_virtual' /tmp/ccplhGBR.o: (.rodata._ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[vtable for CryptoPP::IteratedHash<unsigned int, CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>, 64u, CryptoPP::HashTransformation>]+0x60): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::HashMultipleBlocks(unsigned int const*, unsigned int)' /tmp/ccplhGBR.o: (.rodata._ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[vtable for CryptoPP::IteratedHash<unsigned int, CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>, 64u, CryptoPP::HashTransformation>]+0x68): undefined reference to `__cxa_pure_virtual' /tmp/ccplhGBR.o:(.rodata._ZTIN8CryptoPP15InvalidArgumentE[typeinfo for CryptoPP::InvalidArgument]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /tmp/ccplhGBR.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status The code in my .cpp file should be fine but its the linking of using the library that seems to be wrong somehow. Thankyou! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [EMAIL PROTECTED] More information about Crypto++ and this group is available at http://www.cryptopp.com. -~----------~----~----~----~------~----~------~--~---
