Click here to Skip to main content
15,884,177 members
Articles / Security / Cryptography
Tip/Trick

Building 64-bit Version of the crypto++ DLL

Rate me:
Please Sign up or sign in to vote.
4.83/5 (4 votes)
8 Sep 2014CPOL 14.7K   7  
This tip shows you how to compile crypto++ for 64-bit environment.

Introduction

It is to solve your problem on using crypto++ library in 64bit environment. The 32bit build works fine, but though building a 64bit release of this library compile sucessfully, using this library in other projects shows unusual link errors.

You may face such kind of errors:

1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol Baseline_Add
1>cryptlib.lib(integer.obj) : error LNK2001: unresolved external symbol Baseline_Sub
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

Such linker errors are caused because we miss compiling the assembly level code present in the crypto++ library.

If you check the files in crypto++ library, you can see x64dll.asm and x64masm.asm files which are assembly level codes and are missed to be compiled by C++ compiler.

Compiling Assembly Code

We can customize the build of crypto++ library by adding masm (.targets, .props) in Build Customizations feature in Visual Studio 2010.

Image 1

Right click The Crypto++ project and select "Build Costumizations".

Image 2

Select and check the checkbox with "masm (.targets, .props)" and press OK.

Image 3

Rebuild the crypto++ library and it will be link error free when you use it in other projects as in the picture MainProject.

Thank you for reading.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer E&T Co. Ltd.
Japan Japan
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --