Hi again, in addition to my last problem I have some more info: I have tried using this command?
gcc auth.cpp -libcryptopp.a -o authentication Is that the correct way to go about it? Anyway it comes up with this error: /usr/bin/ld: cannot find -libcryptopp.a collect2: ld returned 1 exit status And I cant even find an ld folder in /usr/bin and my cryptopp library files and my .cpp file I am trying to compile are all in a folder in Documents. So maybe i did not make the library files properly? I did not understand the ld bit in the readme.txt but did manage to pass the verification check. And the libcryptopp.a file does exist in that folder in documents. I also got the usual error (similar to my first post) using this command: gcc auth.cpp -/home/adam/Documents/cryptopp/libcryptopp.a -o authentication On Jun 10, 1:09 pm, Adam Harding <[EMAIL PROTECTED]> wrote: > 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. -~----------~----~----~----~------~----~------~--~---
