Take the 2-minute tour ×

I installed OpenSSL 1.0.0 on Windows using the installer available at: http://www.slproweb.com/products/Win32OpenSSL.html

I added the .lib files to my project (this is Visual Studio, added it to Project Settings->Linker->Input), and it compiles and works fine. But when I remove the OpenSSL DLL files in Windows\system32, it complains that

"Debugger:: An unhandled non-continuable STATUS_DLL_NOT_FOUND exception was thrown during process load"

Any idea why it's still looking for the DLL even when it's compiled with the static libs? I'm not referencing the DLLs anywhere in the project. The static libs I included are libeay32.lib and ssleay32.lib.

Thanks, -M

share|improve this question
There are also static .lib files in that distribution and they're > 10 MB in size (don't know why so much). I haven't tried that yet, but it seems to be what you need. –  Roman Plášil Nov 3 '11 at 15:37
add comment

3 Answers

up vote 0 down vote accepted

It's looking for the DLLs because the code is loaded dynamically at runtime. The code in the static libraries is just a set of stub functions which call into the DLL -- compare the sizes of the .lib and .dll files, and I bet you'll see that the DLLs are much larger, since that's where the bulk of the actual encryption code lies.

Hence, as you found out, you should not delete the DLLs. In order to distribute your program properly, you'll also need to distribute those DLLs with it in order for it to work correctly. However, keep in mind that there are legal issues with doing this, since there are US export restrictions on certain encryption code. So be extra careful in redistributing those DLLs -- make extra sure what you're doing is legal.

share|improve this answer
Thanks Adam. Is there a way to do away with the need for the DLLs entirely? I'd prefer to just compile with static libs and not have to distribute the DLLs along with the app... Btw it looks like the lib file is 754KB and the DLL is 1.09MB -- it's larger but not very much larger. Still just a stub, do you think? –  mindthief Nov 2 '10 at 1:51
You can do that, but you'll have to compile openssl as a static library –  taxilian Jul 14 '11 at 23:40
add comment

use libeay32MT.lib file that have almost 19 mb size as your library. because it is a static library but libeay32.lib is a library for using the dll.

share|improve this answer
add comment

You can get static libraries here:


(see http://www.ie7pro.com/openssl.html).

These are built with static runtime libraries so if you are using VC++ you may need to go to:

Configuration Properties--> C/C++--> Code Generation--> Runtime Library

and select /MT instead of /MD to avoid linkage conflicts (or alternatively use the /NODEFAULTLIB:LIBCMT, etc. in Linker--> Command Line--> Additional Options).

share|improve this answer
add comment

Your Answer


