Merge pull request #25 from trtom/master
[platform/upstream/curl.git] / winbuild / BUILD.WINDOWS.txt
1 Building with Visual C++, prerequises\r
2 =====================================\r
3    This document describes how to compile, build and install curl and libcurl\r
4    from sources using the Visual C++ build tool. To build with VC++, you will\r
5    of course have to first install VC++. The minimum required version of\r
6    VC is 6 (part of Visual Studio 6). However using a more recent version like\r
7    2008 (vc9) is strongly recommended.\r
8 \r
9    VC++ is also part of the Windows Platform SDK. You do not have to install\r
10    the full Visual Studio or Visual C++ if all you want is to build curl.\r
11 \r
12    The Platform SDK can be fetched here, freely:\r
13 \r
14     http://msdn.microsoft.com/en-us/windows/bb980924\r
15 \r
16    If you wish to support zlib, openssl, ssh2, you will have to download\r
17    them separately and copy them to the deps directory as shown below:\r
18    \r
19    somedirectory\\r
20     |_curl-src\r
21     | |_winbuild\r
22     |\r
23     |_deps\r
24       |_ lib\r
25       |_ include\r
26       |_ bin\r
27 \r
28    It is also possible to create the deps directory in some other random\r
29    places and tell the Makefile its location using the WITH_DEVEL option.\r
30 \r
31 Building with Visual C++\r
32 ========================\r
33 \r
34 Open a Visual Studio Command prompt or the SDK CMD shell.\r
35 \r
36     Using the CMD Shell:\r
37      choose the right environment via the setenv command (see setenv /?)\r
38      for the full list of options. setenv /xp /x86 /release for example.\r
39 \r
40     Using the Visual Studio command prompt Shell:\r
41      Everything is already pre-configured by calling one of the command\r
42      prompt.\r
43 \r
44 Once you are in the console, go to the winbuild directory in the Curl \r
45 sources:\r
46     cd curl-src\winbuild\r
47 \r
48 Then you can call nmake /f makefile with the desired options (see below).\r
49 The builds will be in the top src directory, builds\ directory, in \r
50 a directory named using the options given to the nmake call.\r
51 \r
52 nmake /f makefile.vc mode=<static or dll> <options>\r
53 where <options> is one or many of:\r
54   VC=<6,7,8,9,10>              - VC versions\r
55   WITH_DEVEL=<path>            - Paths for the development files (SSL, zlib, etc.)\r
56                                  Default to sibbling directory deps: ../deps\r
57                                  Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/\r
58                                  Uncompress them into the deps folder.\r
59   WITH_SSL=<dll or static>     - Enable OpenSSL support, DLL or static\r
60   WITH_ZLIB=<dll or static>    - Enable ZLib support, DLL or static\r
61   WITH_SSH2=<dll or static>    - Enable LIbSSH2 support, DLL or static\r
62   USE_SSSPI=<yes or no>        - Enable SSPI support, default to yes\r
63   USE_IPV6=<yes or no>         - Enable IPV6, default to yes\r
64   DEBUG=<yes or no>            - Debug builds\r
65   USE_IDN=<yes or no>          - Wheter or not to use IDN Windows APIs. Requires Windows Vista or later.\r
66                                  or to install http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815\r
67   GEN_PDB=<yes or no>          - Generate Program Database (debug symbols release build)\r
68 \r