Well I solved the problem by installing shared libs from v5.2.1
(http://stentz.freshrpms.net/rpm.html?id=73).  However, I'd like to
know how to compile the shared libs version myself - any help would be
appreciated..
THanks!

On Jun 15, 11:12 am, FireWall <[EMAIL PROTECTED]> wrote:
> Hi, I have the following code (stripped down to relevant parts):
>
> #include <cryptopp/cryptlib.h>
> #include <cryptopp/sha.h>
> #include <cryptopp/aes.h>
> #include <cryptopp/modes.h>
> #include <cryptopp/base64.h>
>
> USING_NAMESPACE(CryptoPP)
> byte iv[32];
> typedef unsigned char BYTE;
>
> int main(void) {
>         memset(iv,0x01,32);
>         memcpy(iv,(BYTE *)seed,32);
>         CFB_Mode<AES>::Encryption *eAES = new CFB_Mode<AES>::Encryption((BYTE
> *)key,32,iv);
>         CFB_Mode<AES>::Decryption *dAES = new CFB_Mode<AES>::Decryption((BYTE
> *)key,32,iv);
> return 0;
>
> }
>
> The above code, when compiled with g++ -lpthread -L. -lcryptopp
> generates the following errors (only posting first few lines - actual
> errors span past scroll buffer):
>
> main.cpp:(.text+0x1add): undefined reference to
> `CryptoPP::Algorithm::Algorithm(bool)'
> main.cpp:(.text+0x1ae6): undefined reference to `vtable for
> CryptoPP::Rijndael::Base'
> main.cpp:(.text+0x1aed): undefined reference to `vtable for
> CryptoPP::Rijndael::Base'
> main.cpp:(.text+0x1b01): undefined reference to
> `CryptoPP::AllocatorWithCleanup<unsigned int,
> false>::allocate(unsigned int, void const*)'
> main.cpp:(.text+0x1b1b): undefined reference to
> `CryptoPP::Algorithm::Algorithm(bool)'
> main.cpp:(.text+0x1b3f): undefined reference to
> `CryptoPP::AllocatorWithCleanup<unsigned char,
> false>::allocate(unsigned int, void const*)'
> main.cpp:(.text+0x1b6d): undefined reference to
> `CryptoPP::AllocatorWithCleanup<unsigned char,
> false>::allocate(unsigned int, void const*)'
> main.cpp:(.text+0x1bb2): undefined reference to
> `CryptoPP::SimpleKeyingInterface::SetKey(unsigned char const*,
> unsigned int, CryptoPP::NameValuePairs const&)'
> main.cpp:(.text+0x1bdc): undefined reference to
> `CryptoPP::Algorithm::Algorithm(bool)'
> main.cpp:(.text+0x1be6): undefined reference to `vtable for
> CryptoPP::Rijndael::Base'
> main.cpp:(.text+0x1bed): undefined reference to `vtable for
> CryptoPP::Rijndael::Base'
> main.cpp:(.text+0x1c01): undefined reference to
> `CryptoPP::AllocatorWithCleanup<unsigned int,
> false>::allocate(unsigned int, void const*)'
> main.cpp:(.text+0x1c1c): undefined reference to
> `CryptoPP::Algorithm::Algorithm(bool)'
> main.cpp:(.text+0x1c40): undefined reference to
> `CryptoPP::AllocatorWithCleanup<unsigned char,
> false>::allocate(unsigned int, void const*)'
> main.cpp:(.text+0x1c6e): undefined reference to
> `CryptoPP::AllocatorWithCleanup<unsigned char,
> false>::allocate(unsigned int, void const*)'
> main.cpp:(.text+0x1cb3): undefined reference to
> `CryptoPP::SimpleKeyingInterface::SetKey(unsigned char const*,
> unsigned int, CryptoPP::NameValuePairs const&)'
> /tmp/ccdwgwCm.o:
> (.gnu.linkonce.r._ZTVN8CryptoPP36CipherModeFinalTemplate_CipherHolderINS_16BlockCipherFinalILNS_9CipherDirE0ENS_8Rijndael3EncEEENS_20ConcretePolicyHolderINS_5EmptyENS_22CFB_EncryptionTemplateINS_20AbstractPolicyHolderINS_24CFB_CipherAbstractPolicyENS_14CFB_ModePolicyEEEEESA_EEEE[vtable
> for
> CryptoPP::CipherModeFinalTemplate_CipherHolder<CryptoPP::BlockCipherFinal<(CryptoPP::CipherDir)0,
> CryptoPP::Rijndael::Enc>,
> CryptoPP::ConcretePolicyHolder<CryptoPP::Empty,
> CryptoPP::CFB_EncryptionTemplate<CryptoPP::AbstractPolicyHolder<CryptoPP::CFB_CipherAbstractPolicy,
> CryptoPP::CFB_ModePolicy> >, CryptoPP::CFB_CipherAbstractPolicy> >]
> +0x1c): undefined reference to
> `CryptoPP::CFB_CipherTemplate<CryptoPP::AbstractPolicyHolder<CryptoPP::CFB_CipherAbstractPolicy,
> CryptoPP::CFB_ModePolicy> >::OptimalBlockSize() const'
>
> Any ideas whats going on here?  I compiled libcryptopp using make all
> && make install, without any errors.. I've verified that libcryptopp
> is in /usr/lib/. and have even tried referencing it directly (-L/usr/
> lib/libcryptopp) with the same results.  I'm at a loss.. :(


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

Reply via email to