I am trying to run the most basic program with botan crypto library. I am using Botan 1.10 32bit. I got the binaries with their installer on Windows 7. IDE is Visual studio 2012.
I linked my project to botan.lib but the program reports a missing botan.dll on startup so I assume that the lib just links to the dll. Therefore I've put the botan.dll in the Debug folder.
Now to the problem.
#include <iostream>
#include <botan/botan.h>
using namespace Botan;
using namespace std;
int main(int argc, char* argv[]) {
try {
cout << "d1";
LibraryInitializer init; //exception thrown here
}
catch(exception& e) {
cout << "Exception caught: " << e.what() << std::endl;
}
cout << "d2";
return 0;
}
Intellisense detects everything ok. When I try to debug, I get:
First-chance exception at 0x6A1F2AA0 (botan.dll) in rsa.exe: 0xC0000005: Access violation reading location 0x00310000. Unhandled exception at 0x6A1F2AA0 (botan.dll) in rsa.exe: 0xC0000005: Access violation reading location 0x00310000.
It seems that an exception is thrown inside botan.dll and I can't catch it on my side. I cannot go further from here.
Did I do something wrong linking to the library or is there some other problem? Help appreciated.