Success! Scott, thank you for the help. I did indeed run nmake -f ms\ntdll.mak. Just to correct a type, I had to run 'nmake -f ms\nt.mak', not 'nt.dll'.
Regards, Jed Mitten On Feb 1, 2008 12:48 PM, Scott Rueter <[EMAIL PROTECTED]> wrote: > Jed Mitten wrote: > > >I am trying to statically link into libeay32.lib so that I can > >distribute my application as a single executable instead of packaging > >DLLs along with it. I am not new to programming, but I am new to > >using libraries in C/C++. I am also completely new to using OpenSSL > >in any application. > > > >I did some extensive research online (and in this group) to get to > >where I could actually compile OpenSSL on Win32 and link using Visual > >C++ Express 9.0, but when I run the application that compiles I get an > >error that libeay32.dll cannot be found. Thanks for any help or > >advice. > > > > > Option 1: > First, it seems that you have compiled a dll rather than a static lib > for openssl. > IE you used: nmake -f ms\ntdll.mak > > If you want a static lib you need to run: > nmake -f ms\nt.dll > > When you create a dll build it creates a .dll and .lib. The lib for > linking against when you make your own executable, but you will still > need to include the .dll in your distribution. > If you create a static build, all you will have is a .lib; no .dll will > be created. > > Note however that your executable will be larger if you use a static > library. > > Option 2: > The other option is to take your libeay32.dll and put it in the same > directory as your executable. > > >#include <iostream> > >#include <string> > >#include <openssl/blowfish.h> > >using namespace std; > > > > > >int main(int argc, char *argv[]) { > > string skey = "secret_key"; > > char *sdata = "This is a message that I would like to keep secret. > > Please do not allow this message to be read without authorization."; > > > > BF_KEY symKey; > > BF_set_key( &symKey, strlen(sdata), (const unsigned char *)sdata ); > > > > cout << symKey.S; > > > > return 0; > >} > > > >-- > >Jed Mitten > >______________________________________________________________________ > >OpenSSL Project http://www.openssl.org > >User Support Mailing List openssl-users@openssl.org > >Automated List Manager [EMAIL PROTECTED] > > > > > > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager [EMAIL PROTECTED] > ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]