well it worked, I thought I had tried linking to the stl library before,
however, I don't think I was including the appropriate headers before, etc.
After carefully fixing the makefile and rebuilding, everything went
smoothly.
Thanks for the quick response, and in case I've never said so, thanks for
providing this fantastic library!
Crypto++ rocks!
(I'm telling all my friends! :> )
-Matt

-----Original Message-----
From: Matthew Brown [mailto:[EMAIL PROTECTED]
Sent: Monday, February 09, 2004 8:36 PM
To: 'Wei Dai'
Cc: [EMAIL PROTECTED]
Subject: RE: Undefined Reference link errors


Thanks! I'll try that. That makes a lot of sense.

I tried some more stuff today:
I got it to work by actually copying over all the cryptopp .cpp files, and
compiling them into my project.
That worked.
BUT--what I used the command I pulled from "GNUmakefile" to make all of
these .o files (the ones that just worked when compiling) into a library:
"ar -cr libcryptopp.a"

this resulting library produces errors... so I'm guessing somehow, I'm
using/building the library incorrectly or something.
-Matt

-----Original Message-----
From: Wei Dai [mailto:[EMAIL PROTECTED]
Sent: Monday, February 09, 2004 8:29 PM
To: Matthew Brown
Cc: [EMAIL PROTECTED]
Subject: Re: Undefined Reference link errors


It looks like you compiled Crypto++ without STLport, but your own program
with it. It have to use it for both, or neither.

On Mon, Feb 09, 2004 at 08:25:21AM -0500, Matthew Brown wrote:
> I've found a few threads on this mailing list with almost the same exact
> problem that I have, but they were never resolved, hopefully they were
just
> never posted.
>
> - version: crypto5.1
> - redhat version 9.0
> - g++ 3.2.2
>
> cryptest.exe compiles and runs (cryptest.exe v runs fine)
> However, when I try to link the library (libcryptopp.a) from another
> program, I get "undefined reference" errors for everything that I use in
my
> program.
> AKA, I get about 8 pages of stuff like this:
> [Command Line:]
> c++ -o PublicKeyServer PublicKeyServer.o CryptoUtils.o
> NetworkMessages.o -L/ExternalLibs -lcryptopp -lstlport_gcc -lnsl
> [Beginning of output:]
> CryptoUtils.o(.gnu.linkonce.d._ZTVN8CryptoPP10HexDecoderE+0x90): undefined
> reference to
> `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned
> long&, _STL::basic_string<char, _STL::char_traits<char>,
> _STL::allocator<char> > const&, bool)'
> CryptoUtils.o(.gnu.linkonce.d._ZTVN8CryptoPP10HexDecoderE+0x94): undefined
> reference to
> `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&,
unsigned
> long&, unsigned long, _STL::basic_string<char, _STL::char_traits<char>,
> _STL::allocator<char> > const&, bool) const'
> CryptoUtils.o(.gnu.linkonce.d._ZTVN8CryptoPP10HexDecoderE+0x98): undefined
> reference to
>
`CryptoPP::BufferedTransformation::ChannelCreatePutSpace(_STL::basic_string<
> char, _STL::char_traits<char>, _STL::allocator<char> > const&, unsigned&)'
> ...
>
> Any ideas?
>
> I've used this library a bunch on windows with no problem, which is why
this
> is such a surprise to me. (I spent the whole weekend trying to nail down
why
> this is happening)
>
> Other threads with similar problems include:
> http://www.escribe.com/software/crypto/m3404.html
> http://www.escribe.com/software/crypto/m2895.html
> http://www.escribe.com/software/crypto/m2417.html




Reply via email to