I am new to Crypto++ and wrote a small application that successfully uses the SHA, AES, X917 and RSA methods under the debug build. However, when I try and build my application to use the release build of cryptopp.dll, it compiles and links fine but returns "The application failed to initialize properly (0xc0000005)" and then "Unhandled exception in Crypto.exe (NTDLL.DLL): 0XC0000005: Access Violation". I have placed a copy of the release build dll into the directory with the exe and have directed the linker to use the cryptopp.lib in the /crypto++/release directory

I read the 'fact-o-matic' and have tried several different settings under 'Project/Settings/C/C++/Use run time library:'

Here are the last settings I tried: '/nologo /Gz /MD /W3 /GX /O2 /I "\Crypto++\Include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "CRYPTOPP_DLL_ONLY" /Fp"Release/Crypto.pch" /YX /Fo"Release/" /Fd"Release/" /FD /I /Crypto++/Include" " /c'

The key is not necessarily the settings you use, but that the settings match the settings you use to build the crypto library. Most importantly, the Multithreading setting needs to match - either with or without.

Failing that, one thing the debug stuff does that release doesn't do
is to initialize memory to zero. So if you are using a buffer and
expect it to be null-terminated, it would work in debug mode but might
not in release mode.

--
Jonathan Arnold     (mailto:[EMAIL PROTECTED])
Amazing Developments       http://www.buddydog.org

Genius may have its limitations, but stupidity is not
thus handicapped. -- Elbert Hubbard



Reply via email to