Hi,

> g++ -lcrypto++ -o md5test md5test.cpp
It looks like the library name is incorrect. Did you change it in the
Crypto++ makefile (or is it now being named crypto++.a?) I am not a g++
expert.

Jeff

Jeffrey Walton
Network Administrator
[EMAIL PROTECTED]
Office 410.222.1787 x3229
Cell 443.994.5430
>>> [EMAIL PROTECTED] 12/03/05 8:47 AM >>>
Hi,

My System:
Gentoo

Linux pylon 2.6.14-gentoo-r4 #2 Fri Dec 2 18:55:43 CET 2005 x86_64 AMD
Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux

Lese Spezifikationen von /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/specs
Konfiguriert mit:
/var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.4
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.4
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.4/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.4/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/include/g++-v3
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu
--disable-altivec --enable-nls --without-included-gettext
--with-system-zlib --disable-checking --disable-werror
--disable-libunwind-exceptions --enable-multilib --enable-java-awt=gtk
--enable-languages=c,c++,java,f77 --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread-Modell: posix
gcc-Version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)


Here is my test app:

#include <crypto++/md5.h>
#include <crypto++/filters.h>
#include <crypto++/files.h>
#include <crypto++/hex.h>
#include <crypto++/cryptlib.h>


#include <iostream>

using namespace CryptoPP;
using namespace std;

int main( int argc, char** argv )
{
 MD5 hash;
 byte buffer[2 * MD5::DIGESTSIZE]; //output size of the buffer

 FileSource f(argv[1], true,
               new HashFilter(hash,
               new HexEncoder(new ArraySink(buffer,2 *
MD5::DIGESTSIZE))));
 cout << string((const char*)buffer,2 * MD5::DIGESTSIZE)  << endl;
 return 0;
}

I compile it with g++ -lcrypto++ -o md5test md5test.cpp

And here are my errors:

/tmp/ccdTc7Kv.o: In function `CryptoPP::IteratedHashBase<unsigned int,
CryptoPP::HashTransformation>::~IteratedHashBase()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP16IteratedHashBaseIjNS_18HashTransformationEED2Ev+0x12):
undefined reference to `vtable for CryptoPP::IteratedHashBase<unsigned
int, CryptoPP::HashTransformation>'
/tmp/ccdTc7Kv.o: In function
`CryptoPP::HashTransformation::~HashTransformation()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP18HashTransformationD2Ev+0x11):
undefined reference to `vtable for CryptoPP::HashTransformation'
/tmp/ccdTc7Kv.o: In function `CryptoPP::Source::~Source()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP6SourceD2Ev+0x11): undefined
reference to `vtable for CryptoPP::Source'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP6SourceD2Ev+0x25): undefined
reference to `vtable for CryptoPP::Source'
/tmp/ccdTc7Kv.o: In function `CryptoPP::Filter::~Filter()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP6FilterD2Ev+0x12): undefined
reference to `vtable for CryptoPP::Filter'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP6FilterD2Ev+0x26): undefined
reference to `vtable for CryptoPP::Filter'
/tmp/ccdTc7Kv.o: In function
`CryptoPP::BufferedTransformation::~BufferedTransformation()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP22BufferedTransformationD2Ev+0x11):
undefined reference to `vtable for CryptoPP::BufferedTransformation'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP22BufferedTransformationD2Ev+0x25):
undefined reference to `vtable for CryptoPP::BufferedTransformation'
/tmp/ccdTc7Kv.o: In function `CryptoPP::FileStore::~FileStore()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP9FileStoreD1Ev+0x12):
undefined reference to `vtable for CryptoPP::FileStore'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP9FileStoreD1Ev+0x26):
undefined reference to `vtable for CryptoPP::FileStore'
/tmp/ccdTc7Kv.o: In function `CryptoPP::Store::~Store()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP5StoreD2Ev+0x11): undefined
reference to `vtable for CryptoPP::Store'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP5StoreD2Ev+0x25): undefined
reference to `vtable for CryptoPP::Store'
/tmp/ccdTc7Kv.o: In function
`CryptoPP::AlgorithmParametersBase::~AlgorithmParametersBase()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP23AlgorithmParametersBaseD2Ev+0x12):
undefined reference to `vtable for CryptoPP::AlgorithmParametersBase'
/tmp/ccdTc7Kv.o: In function
`CryptoPP::HashFilter::HashFilter(CryptoPP::HashTransformation&,
CryptoPP::BufferedTransformation*, bool)':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP10HashFilterC1ERNS_18HashTransformationEPNS_22BufferedTransformationEb+0x33):
undefined reference to `vtable for CryptoPP::HashFilter'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP10HashFilterC1ERNS_18HashTransformationEPNS_22BufferedTransformationEb+0x47):
undefined reference to `vtable for CryptoPP::HashFilter'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP10HashFilterC1ERNS_18HashTransformationEPNS_22BufferedTransformationEb+0x74):
undefined reference to
`CryptoPP::Filter::Detach(CryptoPP::BufferedTransformation*)'
/tmp/ccdTc7Kv.o: In function
`CryptoPP::Bufferless<CryptoPP::Filter>::Bufferless()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP10BufferlessINS_6FilterEEC2Ev+0x16):
undefined reference to
`CryptoPP::Filter::Filter(CryptoPP::BufferedTransformation*)'
/tmp/ccdTc7Kv.o: In function
`CryptoPP::HexEncoder::HexEncoder(CryptoPP::BufferedTransformation*,
bool, int, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP10HexEncoderC1EPNS_22BufferedTransformationEbiRKSsS4_+0xe5):
undefined reference to `vtable for CryptoPP::HexEncoder'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP10HexEncoderC1EPNS_22BufferedTransformationEbiRKSsS4_+0xf9):
undefined reference to `vtable for CryptoPP::HexEncoder'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP10HexEncoderC1EPNS_22BufferedTransformationEbiRKSsS4_+0x1c8):
undefined reference to
`CryptoPP::HexEncoder::IsolatedInitialize(CryptoPP::NameValuePairs
const&)'
/tmp/ccdTc7Kv.o: In function `CryptoPP::ProxyFilter::~ProxyFilter()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP11ProxyFilterD2Ev+0x12):
undefined reference to `vtable for CryptoPP::ProxyFilter'
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP11ProxyFilterD2Ev+0x26):
undefined reference to `vtable for CryptoPP::ProxyFilter'
/tmp/ccdTc7Kv.o: In function
`CryptoPP::FilterWithBufferedInput::~FilterWithBufferedInput()':
md5test.cpp:(.gnu.linkonce.t._ZN8CryptoPP23FilterWithBufferedInputD2Ev+0x12):
undefined reference to `vtable for CryptoPP::FilterWithBufferedInput'


And many many more.

Does anybody know what this means?


Reply via email to