-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem building and using Crypto++ on Windows #390
Comments
Don't use the DLL on Windows. The DLL is the FIPS DLL, and it only provides FIPS 140-2 algorithms. You still need to link to the static version of the library to get the missing classes. Its an awful setup that constantly confuses users. Also see Visual Studio on the wiki. I think the best course of action for you is to use either Debug or Release configurations. Ignore the DLL-Import configurations. If you want a DLL, then create a wrapper DLL, export what you want, and then link to the static version of the Crypto++ library.
It sounds like your project's configuration is not quite right. Perhaps you should checkout MSDN about setting up a VS project; or ask on Stack Overflow or the user list. |
Ah, thanks, I think I understand this now.
and build the project, the output says "error LNK1181: cannot open input file "cryptlib.lib"". Therefore I assume that when including the step above and this message doesn't appear cryptlib.lib can be accessed. Thank you, I'll write to the mailing list. |
I see you visited the user list. We will get things sorted out with you on the list. I'm going to close this out now. |
Hi,
I'd like to use crypto++. I am using Windows 7 (64 bit). The last days I have tried to build it using different Visual Studio versions but I did not have success. I'd like to describe the steps I did and ask for help what I did wrong.
Among others, the following was given in the output as well:
I open cmd.exe, move to C:\cryptopp565\x64\Output\Release, copy the TestData and TestVector folders into this folder and execute cryptest.exe v. It ends with All tests are passed!.
In VS2012 I create a new console application project. I copy the sample code for AES encryption from this StackOverflow anser into my ConsoleApplication.cpp.
As I understand it, I now have to include the header files of crypto++ and make the static library known to the project:
I right-click on my ConsoleApplication project and go to Properties > Configuration Properties > VC++ Directories >Include Directories. There I add C:\cryptopp565 (the folder where the headers are located).
I right-click on my ConsoleApplication project and go to Properties > Configuration Properties > VC++ Directories >Library Directories. There I add C:\cryptopp565\x64\Output\Release (the folder where cryptlib.lib is located).
I right-click on my ConsoleApplication project and go to Properties > Configuration Properties > Linker > Input > Additional Dependencies . There I add cryptlib.lib (which is in the folder stated one bullet point above).
Now all the red markings in ConsoleApplication.cpp disappear.
I right-click on my ConsoleApplication project and choose build. 50 errors are displayed in the output window. This is one of them (the rest have the same shape):
Does it mean that some definitions / implemenations for some header files are missing? Does more than the cryptlib.lib file have to be included? How can this be fixed?
The text was updated successfully, but these errors were encountered: