unresolved external symbols

286 views
Skip to first unread message

scott

unread,
Apr 23, 2011, 4:14:33 AM4/23/11
to Crypto++ Users
I am trying to compile a simple test of the blowfish example for a 64
bit build. I am using visual studio 2010 ultimate. I created the lib
file with 64 bit settings, and then I goto compile my test program and
I get this

1>cryptlib.lib(sha.obj) : error LNK2001: unresolved external symbol
X86_SHA256_HashBlocks
1>cryptlib.lib(rijndael.obj) : error LNK2001: unresolved external
symbol Rijndael_Enc_AdvancedProcessBlocks
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external
symbol Baseline_Add
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external
symbol Baseline_Sub

I saw an old post http://www.mail-archive.com/cryptop...@googlegroups.com/msg05139.html
that was never resolved. I am having that issue.

The build works fine on a 32 bit build, but 64 bit build is not
working correctly. Any suggestions?

scott

unread,
Apr 24, 2011, 12:59:12 AM4/24/11
to Crypto++ Users
Well, after messing with settings for hours now, i fixed the problem,
but I have no idea how I did it. I can compile a 64 bit library that I
used to link in my program and there are no unresolved symbols.
Unfortunately, I do not know what i did to solve the problem, nor why
it was occurring.

Mona Essam

unread,
Aug 16, 2011, 7:24:15 AM8/16/11
to cryptop...@googlegroups.com


scott-289 wrote:
>
> Dear scott
> can you help me with specific steps how to link and use the crypto++
> library in my program VS8.0 on windows 7
>
> i need to use the blowfish and RC5 algorithms in CBC mode, but when i try
> to compile my program i got unresolved external symbols
>
> my program is as follwos:
> // first.cpp : Defines the entry point for the console application.
> //
>
> #include "stdafx.h"
> #include <iostream>
>
> #include <C:\Users\mona_essam\Downloads\crypto++\osrng.h> //needed for
> AutoSeededRandomPool
> #include <C:\Users\mona_essam\Downloads\crypto++\modes.h>
> #include <C:\Users\mona_essam\Downloads\crypto++\blowfish.h>
> #include <C:\Users\mona_essam\Downloads\crypto++\filters.h>
>
> using namespace std;
> using namespace CryptoPP; //the general crapto++ namespace
>
> int main() {
>
> AutoSeededRandomPool rng;
> string key(Blowfish::DEFAULT_KEYLENGTH, 0);
> string iv(Blowfish::BLOCKSIZE, 0);// this is the Initialization
> Vecktor
>
> //Create a random key as well as a random IV with default sizes (16)
> rng.GenerateBlock((unsigned char*)key.c_str(),
> Blowfish::DEFAULT_KEYLENGTH);
> rng.GenerateBlock((unsigned char*)iv.c_str(), Blowfish::BLOCKSIZE);
>
> string plain = "This string will be encrypted throug Blowfish!";
> string encrypted; //will store the encrypted string
> string decrypted; //will store the string after it is decrypted again
>
> //Setup the Blowfish Cipher in CBC-Mode
> Blowfish::Encryption blowEn((unsigned char*)key.c_str(), key.size());
> CBC_Mode_ExternalCipher::Encryption cbcEn( blowEn, (unsigned
> char*)iv.c_str() );
>
> //Put the "plain" string into the cipher and encrypt it to "encrypted
> StreamTransformationFilter stfEncryptor(cbcEn, new StringSink(
> encrypted ) );
> stfEncryptor.Put( (unsigned char*)plain.c_str(), plain.size() + 1 );
> stfEncryptor.MessageEnd();
>
> // Decrypt (very analog to the encryption block
> Blowfish::Decryption blowDe((unsigned char*)key.c_str(), key.size());
> CBC_Mode_ExternalCipher::Decryption cbcDe( blowDe, (unsigned
> char*)iv.c_str() );
>
> StreamTransformationFilter stfDecryptor(cbcDe, new StringSink(
> decrypted ) );
> stfDecryptor.Put((unsigned char*)encrypted.c_str(), encrypted.size()
> );
> stfDecryptor.MessageEnd();
>
> //Dump "plain"
> cout << "Plain: "<< endl << plain << endl << endl;
>
> //Dump "encrypted" (convert it to hexadecimal numbers for better
> reading)
> cout << "Encrypted text: " << endl;
> for( int i = 0; i < encrypted.size(); i++ ) {
> cout << hex << (0xff & (int)encrypted[i]) << " ";
> }
>
> cout << endl << endl;
>
> // Dump Decrypted Text
> cout << "Decrypted Text: " << endl;
> cout << decrypted;
> cout << endl << endl << ":-)" << endl;
>
> return 0;
> }
> ===================================
>
> and the errors are :
> Error 1 error LNK2001: unresolved external symbol "class
> CryptoPP::NameValuePairs const & const CryptoPP::g_nullNameValuePairs"
> (?g_nullNameValuePairs@CryptoPP@@3ABVNameValuePairs@1@B)
>
> Error 2 error LNK2001: unresolved external symbol "public: virtual void
> __thiscall CryptoPP::Blowfish::Base::UncheckedSetKey(unsigned char const
> *,unsigned int,class CryptoPP::NameValuePairs const &)"
> (?UncheckedSetKey@Base@Blowfish@CryptoPP@@UAEXPBEIABVNameValuePairs@3@@Z)
>
> Error 3 error LNK2001: unresolved external symbol "public: virtual void
> __thiscall CryptoPP::Blowfish::Base::ProcessAndXorBlock(unsigned char
> const *,unsigned char const *,unsigned char *)const "
> (?ProcessAndXorBlock@Base@Blowfish@CryptoPP@@UBEXPBE0PAE@Z)
>
> Please if you can help me , i would be so grateful to you
>
>
>
>

--
View this message in context: http://old.nabble.com/unresolved-external-symbols-tp31460600p32270800.html
Sent from the Crypto++ Users mailing list archive at Nabble.com.

Reply all
Reply to author
Forward
0 new messages