Blame README.msvc

Packit 514978
Packit 514978
Packit 514978
                          ___       __ _ _ __ ___  ___ 
Packit 514978
                         / __| ___ / _` | '__/ _ \/ __|
Packit 514978
                        | (_  |___| (_| | | |  __/\__ \
Packit 514978
                         \___|     \__,_|_|  \___||___/
Packit 514978
Packit 514978
Packit 514978
                How to build c-ares using MSVC or Visual Studio
Packit 514978
               =================================================
Packit 514978
Packit 514978
Packit 514978
Packit 514978
  How to build using MSVC from the command line
Packit 514978
  ---------------------------------------------
Packit 514978
Packit 514978
  Open a command prompt window and ensure that the environment is properly
Packit 514978
  set up in order to use MSVC or Visual Studio compiler tools.
Packit 514978
Packit 514978
  Change to c-ares source folder where Makefile.msvc file is located and run:
Packit 514978
Packit 514978
  > nmake -f Makefile.msvc
Packit 514978
Packit 514978
  This will build all c-ares libraries as well as three sample programs.
Packit 514978
Packit 514978
  Once the above command has finished a new folder named MSVCXX will exist
Packit 514978
  below the folder where makefile.msvc is found. The name of the folder
Packit 514978
  depends on the MSVC compiler version being used to build c-ares.
Packit 514978
Packit 514978
  Below the MSVCXX folder there will exist four folders named 'cares',
Packit 514978
  'ahost', 'acountry', and 'adig'. The 'cares' folder is the one that
Packit 514978
  holds the c-ares libraries you have just generated, the other three
Packit 514978
  hold sample programs that use the libraries.
Packit 514978
Packit 514978
  The above command builds four versions of the c-ares library, dynamic
Packit 514978
  and static versions and each one in release and debug flavours. Each
Packit 514978
  of these is found in folders named dll-release, dll-debug, lib-release,
Packit 514978
  and lib-debug, which hang from the 'cares' folder mentioned above. Each
Packit 514978
  sample program also has folders with the same names to reflect which
Packit 514978
  library version it is using.
Packit 514978
Packit 514978
Packit 514978
  How to install using MSVC from the command line
Packit 514978
  -----------------------------------------------
Packit 514978
Packit 514978
  In order to allow easy usage of c-ares libraries it may be convenient to
Packit 514978
  install c-ares libraries and header files to a common subdirectory tree.
Packit 514978
Packit 514978
  Once that c-ares libraries have been built using procedure described above,
Packit 514978
  use same command prompt window to define environment variable INSTALL_DIR
Packit 514978
  to designate the top subdirectory where installation of c-ares libraries and
Packit 514978
  header files will be done.
Packit 514978
Packit 514978
  > set INSTALL_DIR=c:\c-ares
Packit 514978
Packit 514978
  Afterwards, run following command to actually perform the installation:
Packit 514978
Packit 514978
  > nmake -f Makefile.msvc install
Packit 514978
Packit 514978
  Installation procedure will copy c-ares libraries to subdirectory 'lib' and
Packit 514978
  c-ares header files to subdirectory 'include' below the INSTALL_DIR subdir.
Packit 514978
Packit 514978
  When environment variable INSTALL_DIR is not defined, installation is done
Packit 514978
  to c-ares source folder where Makefile.msvc file is located.
Packit 514978
Packit 514978
Packit 514978
  How to build using Visual Studio 6 IDE
Packit 514978
  --------------------------------------
Packit 514978
Packit 514978
  A VC++ 6.0 reference workspace (vc6aws.dsw) is available within the 'vc'
Packit 514978
  folder to allow proper building of the library and sample programs.
Packit 514978
Packit 514978
  1) Open the vc6aws.dsw workspace with MSVC6's IDE.
Packit 514978
  2) Select 'Build' from top menu.
Packit 514978
  3) Select 'Batch Build' from dropdown menu.
Packit 514978
  4) Make sure that the sixteen project configurations are 'checked'.
Packit 514978
  5) Click on the 'Build' button.
Packit 514978
  6) Once the sixteen project configurations are built you are done.
Packit 514978
Packit 514978
  Dynamic and static c-ares libraries are built in debug and release flavours,
Packit 514978
  and can be located each one in its own subdirectory, dll-debug, dll-release,
Packit 514978
  lib-debug and lib-release, all of them below the 'vc\cares' subdirectory.
Packit 514978
Packit 514978
  In the same way four executable versions of each sample program are built,
Packit 514978
  each using its respective library. The resulting sample executables are
Packit 514978
  located in its own subdirectory, dll-debug, dll-release, lib-debug and
Packit 514978
  lib-release, below the 'vc\acountry', 'vc\adig' and 'vc\ahost'folders.
Packit 514978
Packit 514978
  These reference VC++ 6.0 configurations are generated using the dynamic CRT.
Packit 514978
Packit 514978
Packit 514978
  How to build using Visual Studio 2003 or newer IDE
Packit 514978
  --------------------------------------------------
Packit 514978
Packit 514978
  First you have to convert the VC++ 6.0 reference workspace and project files
Packit 514978
  to the Visual Studio IDE version you are using, following next steps:
Packit 514978
Packit 514978
  1) Open vc\vc6aws.dsw with VS20XX.
Packit 514978
  2) Allow VS20XX to update all projects and workspaces.
Packit 514978
  3) Save ALL and close VS20XX.
Packit 514978
  4) Open vc\vc6aws.sln with VS20XX.
Packit 514978
  5) Select batch build, check 'all' projects and click 'build' button.
Packit 514978
Packit 514978
  Same comments relative to generated files and folders as done above for
Packit 514978
  Visual Studio 6 IDE apply here.
Packit 514978
Packit 514978
Packit 514978
  Relationship between c-ares library file names and versions
Packit 514978
  -----------------------------------------------------------
Packit 514978
Packit 514978
  c-ares static release library version files:
Packit 514978
Packit 514978
      libcares.lib -> static release library
Packit 514978
Packit 514978
  c-ares static debug library version files:
Packit 514978
Packit 514978
      libcaresd.lib -> static debug library
Packit 514978
Packit 514978
  c-ares dynamic release library version files:
Packit 514978
Packit 514978
      cares.dll -> dynamic release library
Packit 514978
      cares.lib -> import library for the dynamic release library
Packit 514978
      cares.exp -> export file for the dynamic release library
Packit 514978
Packit 514978
  c-ares dynamic debug library version files:
Packit 514978
Packit 514978
      caresd.dll -> dynamic debug library
Packit 514978
      caresd.lib -> import library for the dynamic debug library
Packit 514978
      caresd.exp -> export file for the dynamic debug library
Packit 514978
      caresd.pdb -> debug symbol file for the dynamic debug library
Packit 514978
Packit 514978
Packit 514978
  How to use c-ares static libraries
Packit 514978
  ----------------------------------
Packit 514978
Packit 514978
  When using the c-ares static library in your program, you will have to
Packit 514978
  define preprocessor symbol CARES_STATICLIB while building your program,
Packit 514978
  otherwise you will get errors at linkage stage.
Packit 514978
Packit 514978
Packit 514978
Have Fun!
Packit 514978