update for beta universally
[external/c-ares.git] / README.msvc
1
2
3                           ___       __ _ _ __ ___  ___ 
4                          / __| ___ / _` | '__/ _ \/ __|
5                         | (_  |___| (_| | | |  __/\__ \
6                          \___|     \__,_|_|  \___||___/
7
8
9                 How to build c-ares using MSVC or Visual Studio
10                =================================================
11
12
13
14   How to build using MSVC from the command line
15   ---------------------------------------------
16
17   Open a command prompt window and ensure that the environment is properly
18   set up in order to use MSVC or Visual Studio compiler tools.
19
20   Change to c-ares source folder where Makefile.msvc file is located and run:
21
22   > nmake -f Makefile.msvc
23
24   This will build all c-ares libraries as well as three sample programs.
25
26   Once the above command has finished a new folder named MSVCXX will exist
27   below the folder where makefile.msvc is found. The name of the folder
28   depends on the MSVC compiler version being used to build c-ares.
29
30   Below the MSVCXX folder there will exist four folders named 'cares',
31   'ahost', 'acountry', and 'adig'. The 'cares' folder is the one that
32   holds the c-ares libraries you have just generated, the other three
33   hold sample programs that use the libraries.
34
35   The above command builds four versions of the c-ares library, dynamic
36   and static versions and each one in release and debug flavours. Each
37   of these is found in folders named dll-release, dll-debug, lib-release,
38   and lib-debug, which hang from the 'cares' folder mentioned above. Each
39   sample program also has folders with the same names to reflect which
40   library version it is using.
41
42
43   How to build using Visual Studio 6 IDE
44   --------------------------------------
45
46   A VC++ 6.0 reference workspace (vc6aws.dsw) is available within the 'vc'
47   folder to allow proper building of the library and sample programs.
48
49   1) Open the vc6aws.dsw workspace with MSVC6's IDE.
50   2) Select 'Build' from top menu.
51   3) Select 'Batch Build' from dropdown menu.
52   4) Make sure that the sixteen project configurations are 'checked'.
53   5) Click on the 'Build' button.
54   6) Once the sixteen project configurations are built you are done.
55
56   Dynamic and static c-ares libraries are built in debug and release flavours,
57   and can be located each one in its own subdirectory, dll-debug, dll-release,
58   lib-debug and lib-release, all of them below the 'vc\cares' subdirectory.
59
60   In the same way four executable versions of each sample program are built,
61   each using its respective library. The resulting sample executables are
62   located in its own subdirectory, dll-debug, dll-release, lib-debug and
63   lib-release, below the 'vc\acountry', 'vc\adig' and 'vc\ahost'folders.
64
65   These reference VC++ 6.0 configurations are generated using the dynamic CRT.
66
67
68   How to build using Visual Studio 2003 or newer IDE
69   --------------------------------------------------
70
71   First you have to convert the VC++ 6.0 reference workspace and project files
72   to the Visual Studio IDE version you are using, following next steps:
73
74   1) Open vc\vc6aws.dsw with VS20XX.
75   2) Allow VS20XX to update all projects and workspaces.
76   3) Save ALL and close VS20XX.
77   4) Open vc\vc6aws.sln with VS20XX.
78   5) Select batch build, check 'all' projects and click 'build' button.
79
80   Same comments relative to generated files and folders as done above for
81   Visual Studio 6 IDE apply here.
82
83
84   Relationship between c-ares library file names and versions
85   -----------------------------------------------------------
86
87   c-ares static release library version files:
88
89       libcares.lib -> static release library
90
91   c-ares static debug library version files:
92
93       libcaresd.lib -> static debug library
94
95   c-ares dynamic release library version files:
96
97       cares.dll -> dynamic release library
98       cares.lib -> import library for the dynamic release library
99       cares.exp -> export file for the dynamic release library
100
101   c-ares dynamic debug library version files:
102
103       caresd.dll -> dynamic debug library
104       caresd.lib -> import library for the dynamic debug library
105       caresd.exp -> export file for the dynamic debug library
106       caresd.pdb -> debug symbol file for the dynamic debug library
107
108
109   How to use c-ares static libraries
110   ----------------------------------
111
112   When using the c-ares static library in your program, you will have to
113   define preprocessor symbol CARES_STATICLIB while building your program,
114   otherwise you will get errors at linkage stage.
115
116
117 Have Fun!
118