Re: base64Encoder Problems

7 views
Skip to first unread message

Murph...@aol.com

unread,
Nov 11, 2005, 2:02:42 PM11/11/05
to crypto...@eskimo.com
In a message dated 11/11/2005 08:50:18 GMT Standard Time, Cornel.M...@echotech.ch writes:
CRYPTOPP_DLL
Hi, thank you for the reply.
 
Ok, i checked and it wasnt there like you said, i done exactly what you said adding CRYPTOPP_DLL just after class, and checked a few other .h files to make sure i had done it correctly.
 
Now i get a new linker error, so it must have something to do with this, here is my new error.
 
testDlg.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CryptoPP::Base64Encoder::~Base64Encoder(void)" (__imp_??1Base64Encoder@CryptoPP@@UAE@XZ) referenced in function "public: void __thiscall CtestDlg::OnBnClickedGenRsa(void)" (?OnBnClickedGenRsa@CtestDlg@@QAEXXZ)
testDlg.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CryptoPP::Base64Encoder::Base64Encoder(class CryptoPP::BufferedTransformation *,bool,int)" (__imp_??0Base64Encoder@CryptoPP@@QAE@PAVBufferedTransformation@1@_NH@Z) referenced in function "public: void __thiscall CtestDlg::OnBnClickedGenRsa(void)" (?OnBnClickedGenRsa@CtestDlg@@QAEXXZ)
Debug/test.exe : fatal error LNK1120: 2 unresolved externals
 
I would be very gratefull if you could be of any further assistance, as i realy need to encode/decode base64, and this is the only part of the library that will not work.
 
Thank you for your time.
 

Cornel Maftuleac

unread,
Nov 14, 2005, 4:56:40 AM11/14/05
to crypto...@eskimo.com
Murph...@aol.com wrote:

> In a message dated 11/11/2005 08:50:18 GMT Standard Time,
> Cornel.M...@echotech.ch writes:
>
> CRYPTOPP_DLL
>
> Hi, thank you for the reply.
>
> Ok, i checked and it wasnt there like you said, i done exactly what
> you said adding CRYPTOPP_DLL just after class, and checked a few other
> .h files to make sure i had done it correctly.

At this step you should recompile your CryptoPP library.
Changing only the *.h files will give you linker errors.

> Now i get a new linker error, so it must have something to do with
> this, here is my new error.
>
> testDlg.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: virtual __thiscall
> CryptoPP::Base64Encoder::~Base64Encoder(void)"
> (__imp_??1Base64Encoder@CryptoPP@@UAE@XZ

> <mailto:__imp_??1Base64Encoder@CryptoPP@@UAE@XZ>) referenced in

> function "public: void __thiscall CtestDlg::OnBnClickedGenRsa(void)"
> (?OnBnClickedGenRsa@CtestDlg@@QAEXXZ

> <mailto:?OnBnClickedGenRsa@CtestDlg@@QAEXXZ>)


> testDlg.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: __thiscall
> CryptoPP::Base64Encoder::Base64Encoder(class
> CryptoPP::BufferedTransformation *,bool,int)"
> (__imp_??0Base64Encoder@CryptoPP@@QAE@PAVBufferedTransformation@1@_NH@Z

> <mailto:__imp_??0Base64Encoder@CryptoPP@@QAE@PAVBufferedTransformation@1@_NH@Z>)

> referenced in function "public: void __thiscall
> CtestDlg::OnBnClickedGenRsa(void)"
> (?OnBnClickedGenRsa@CtestDlg@@QAEXXZ

> <mailto:?OnBnClickedGenRsa@CtestDlg@@QAEXXZ>)


> Debug/test.exe : fatal error LNK1120: 2 unresolved externals

As I see the constructor and destructor of the class Base64Encoder is
missing.
Take a look a the file base64.h
Class Base64Encoder should be declared as:

class CRYPTOPP_DLL Base64Encoder : public SimpleProxyFilter
{
...
}

If not, change and recompile the library.
Now it should probabily work... :)

Murph...@aol.com

unread,
Nov 10, 2005, 5:59:44 PM11/10/05
to crypto...@eskimo.com
Hi list.
 
I have downloaded the crypto++ latest release of 5.2.3 
 
I am using Visual c++.Net  2003 stnd, and i have managed to fully compile it successfuly.
also, the tests run fine fine.
 
 
I am using the crypto++ in my own apps successfuly, apart from one problem.
 
ANYTIME i use Base64Encoder/Decoder i get linker errors, can anyone help?
 
thank you
Steve

Bill Shanahan

unread,
Nov 10, 2005, 6:09:02 PM11/10/05
to crypto...@eskimo.com
 
using namespace CryptoPP; ?

Murph...@aol.com

unread,
Nov 10, 2005, 6:27:29 PM11/10/05
to crypto...@eskimo.com
Yes, i am using namespace crytoPP, and because of this i am able to use all other functionality within crypto++,
 
I currently do the following, though anyware i have base64encoder/decoder, i have to swap it for hexencoder/decoder for it to work.
 
I do the following:
 
Generate RSA Keys
Encrypt/Decrypt
Sign data/Veryfy signitures (though i cant get it to actualy sign a file, only gen the signiture into a string)
and lots more BUT I CANT ever use base64encoder etc.
 
And yes, i have base64.h included plus the rest.
 
Thank you

Cornel Maftuleac

unread,
Nov 11, 2005, 3:50:44 AM11/11/05
to crypto...@eskimo.com
Murph...@aol.com wrote:

Check if base64 are exported from your CryptoPP library.
Check the file base64.h to ensure that the classes Base64Encoder and
Base64Decoder have CRYPTOPP_DLL export directive.
If not add it and recompile the library.

Reply all
Reply to author
Forward
0 new messages