5eac3820d001f2b5c92ca43b0830a2c612b5d8e9
[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.vc 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 \r
54 where <options> is one or many of:\r
55   VC=<6,7,8,9,10>              - VC versions\r
56   WITH_DEVEL=<path>            - Paths for the development files (SSL, zlib, etc.)\r
57                                  Defaults to sibbling directory deps: ../deps\r
58                                  Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/\r
59                                  Uncompress them into the deps folder.\r
60   WITH_SSL=<dll or static>     - Enable OpenSSL support, DLL or static\r
61   WITH_ZLIB=<dll or static>    - Enable zlib support, DLL or static\r
62   WITH_SSH2=<dll or static>    - Enable libSSH2 support, DLL or static\r
63   ENABLE_SSPI=<yes or no>      - Enable SSPI support, defaults to yes\r
64   ENABLE_IPV6=<yes or no>      - Enable IPv6, defaults to yes\r
65   ENABLE_IDN=<yes or no>       - Enable use of Windows IDN APIs, defaults to yes\r
66                                  Requires Windows Vista or later, or installation from:\r
67                                  http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815\r
68   ENABLE_WINSSL=<yes or no>    - Enable native Windows SSL support, defaults to yes\r
69   GEN_PDB=<yes or no>          - Generate Program Database (debug symbols for release build)\r
70   DEBUG=<yes or no>            - Debug builds\r
71   MACHINE=<x86 or x64>         - Target architecture (default is x86)