Using the VCF Installer. You can install the VCF in a number of ways. The simplest way to install on a "clean" system, is to simply download the VCF Installer from Source Forge, save the appropriate file to your hard drive, run it, and Voila! you are ready to rock and roll!
Install from a source archive. The more complex way is to pull down the latest cvs tar.gz file (again, you can get that from Source Forge) and uncompress it somewhere on you hardrive. Once you have done this you'll need to set up an environment variable:
VCF_ROOT : this should point to the root where you installed the VCF. For example, on my machine it resolves to "d:\code\vcf".
Once you have this done you can open up the projects in Microsoft Visual Studio and build the various workspaces (.dsw files).
Install via CVS access. The most "advanced" way is to connect to cvs and pull down either the latest stable version or the latest development version. There are instructions on SourceForge detailing how to do this.
|Anonymous vs. developer cvs access|
if you download the VCF via anonymous CVS access, and then, realizing it is the greatest thing since sliced bread and toasted crumpets, you decide to join the project (hint, hint), you will need to either delete the directory where you currently have the VCF, or pull it down with cvs to a different directory.
The problem that arises is that you will be unable to check-in anything, despite having joined the project and received write access to the cvs repository. I think this is because cvs thinks you are still "anonymous" and you have no write access for an anonymous user.
Once you have pulled down the code with cvs repeat the steps above for environment variables.
Currently you need to connect to cvs and pull down either the latest stable version or the latest development version. There are instructions on SourceForge detailing how to do this.
In general you don't need to worry about installing any third party libraries, as the VCF comes with all the code you need, including third party libraries that it makes use of. However, this section will discuss those third party libraries that, due perhaps to the size of the library, are not included in the main VCF code base.
Currently this is NOT needed! Please ignore these instructions for now.
You can get the latest version of SSL from http://www.openssl.org/source/, and the most recent version is currently openssl-0.9.7b, but this will obviously change over time.
OpenSSL does not use VC workspaces or project files, and unless you want to find some existing binary installer, you'll need to install it from source. To do this you'll need perl installed on your system, as the OpenSSL build scripts make use of perl to do their work. If you have a version of perl as a result of an existing cygwin installation, do not use this version unless you plan to completely build from the cygwin prompt and create a GCC based version of the library. These instructions are for building a version of the library using Microsoft's VC++.
With that in mind, get the latest perl from ActiveState at http://www.activestate.com/Products/ActivePerl/. They have an excellent installer that will install Perl in a jiffy with no hassle.
OpenSSL has some parts of the library that are coded using optimized assembler, but to make use of this, you'll need Microsoft's MASM tool installed. This may or may not already be on your machine, look for an executable called "ml.exe" in the "bin" directory of the main VC++ directory. If this is not there, you can download it here: http://msdn.microsoft.com/vstudio/downloads/tools/ppack/default.aspx for free. If that link is not working, you may be able to find more information here http://users.easystreet.com/jkirwan/new/pctools.html that provides links to versions of MASM. Please note that you do not have to get MASM, you can build OpenSLL just without it, but the performance may be slightly slower than if you used the assembly version of the some of the routines.
Once you have your tools installed, open a command prompt, and navigate to the bin directory fo your version of VC++. For example, if you installed to the default location and you're using VC6, then this would be "C:\Program Files\Visual Studio\VC98\Bin". For Visual C++ 7.1, it might be "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin" and so forth. Once there run the the vcvars32.bat file to initialize your path to point to the right place for the compiler, linker, etc tools.
In the same shell, cd to the directory that you installed OpenSSL to, for example "c:\openssl-0.9.8a\". Now configure it for VC++ by typing:
perl Configure VC-WIN32
You should see something like this when its done:
Configuring for VC-WIN32 no-gmp [default] OPENSSL_NO_GMP (skip dir) no-krb5 [krb5-flavor not specified] OPENSSL_NO_KRB5 no-mdc2 [default] OPENSSL_NO_MDC2 (skip dir) no-rc5 [default] OPENSSL_NO_RC5 (skip dir) no-shared [default] no-zlib [default] no-zlib-dynamic [default] IsMK1MF=1 CC =cl CFLAG =-DOPENSSL_THREADS -DDSO_WIN32 EX_LIBS = CPUID_OBJ = BN_ASM =bn_asm.o DES_ENC =des_enc.o fcrypt_b.o AES_ASM_OBJ =aes_core.o aes_cbc.o BF_ENC =bf_enc.o CAST_ENC =c_enc.o RC4_ENC =rc4_enc.o RC5_ENC =rc5_enc.o MD5_OBJ_ASM = SHA1_OBJ_ASM = RMD160_OBJ_ASM= PROCESSOR = RANLIB =true ARFLAGS = PERL =perl THIRTY_TWO_BIT mode BN_LLONG mode RC4_INDEX mode RC4_CHUNK is undefined Configured for VC-WIN32.
At this point you can choose to either build the ASM files or not. If you have MASM, then type:
If you don't have MASM, then simply type:
The MASM version should generate something like this:
Generating x86 for MASM assember Bignum DES "crypt(3)" Blowfish CAST5 RC4 MD5 SHA1 RIPEMD160 RC5\32 C:\openssl-0.9.8a>perl util\mkfiles.pl 1>MINFO C:\openssl-0.9.8a>perl util\mk1mf.pl VC-WIN32 1>ms\nt.mak C:\openssl-0.9.8a>perl util\mk1mf.pl dll VC-WIN32 1>ms\ntdll.mak C:\openssl-0.9.8a>perl util\mkdef.pl 32 libeay 1>ms\libeay32.def C:\openssl-0.9.8a>perl util\mkdef.pl 32 ssleay 1>ms\ssleay32.def
You're now ready to start the actual makefile based build process. You can choose to build a static or DLL version of the libraries. For a static build (i.e. a build that you'll statically link to) you'll use the ms\nt.mak file, and for a DLL build you'll use the ms\ntdll.mak file.
To begin a static lib build, type:
nmake -f ms\nt.mak
You should see a whole bunch of output stream by. You'll find the final binaries in .\out32\. Repeat the above step with the DLL Makefile for building the DLL version of the library. If you do this, the DLL binaries will be in .\out32dll\.
To make use of the library you'll need to link to it. The libraries are obviously in the out32 directory, and the include files are in the .\inc32\ directory.
If you want to build for a different version of VC++ make sure to clean the old object code/binaries out first! Otherwise you'll get all sorts of compiler errors