Search code examples
c++windowsvisual-studiocrypto++

How to include Crypto++ into a VS Project


I'm working on a Project that utilizes CryptoPP, but I always get Linking Issues when I try to Compile my Code. Now I wanted to ask here If someone knows howto Link it Correctly.

I already tried:

  • Downloading Crypto++
  • Opening the SLN
  • Building cryptlib

  • Moving the cryptlib.lib to my project folder

  • Including the Crypto++ header into my project
  • Adding the cryptlib.lib to the header files.

I expect my project to fully compile and link, without errors and being able to run some AES just for testing.


Solution

  • The best way is to create a folder named cryptopp inside your project folder (where the .SLN is located) clone or download the source from cryptopp inside the directory.

    From [Visual Studio->Solution Explorer] click on [Solution->Add->Existing Project] and select the cryptlib.vcproj file to include in your solution.

    You can find an example of a project using cryptopp here https://github.com/mrc-g/BitMRC