SPECS
m4
test
vc
.packit.yaml
AUTHORS
CHANGES
INSTALL.md
LICENSE
LICENSE.md
Makefile.Watcom
Makefile.am
Makefile.dj
Makefile.in
Makefile.inc
Makefile.m32
Makefile.msvc
Makefile.netware
NEWS
README.cares
README.md
README.msvc
RELEASE-NOTES
TODO
acinclude.m4
aclocal.m4
acountry.1
acountry.c
adig.1
adig.c
ahost.1
ahost.c
ares.h
ares__close_sockets.c
ares__get_hostent.c
ares__read_line.c
ares__timeval.c
ares_build.h
ares_build.h.in
ares_cancel.3
ares_cancel.c
ares_cancel.pdf
ares_config.h.in
ares_create_query.3
ares_create_query.c
ares_create_query.pdf
ares_data.c
ares_data.h
ares_destroy.3
ares_destroy.c
ares_destroy.pdf
ares_destroy_options.3
ares_destroy_options.pdf
ares_dns.h
ares_dup.3
ares_dup.pdf
ares_expand_name.3
ares_expand_name.c
ares_expand_name.pdf
ares_expand_string.3
ares_expand_string.c
ares_expand_string.pdf
ares_fds.3
ares_fds.c
ares_fds.pdf
ares_free_data.3
ares_free_data.pdf
ares_free_hostent.3
ares_free_hostent.c
ares_free_hostent.pdf
ares_free_string.3
ares_free_string.c
ares_free_string.pdf
ares_get_servers.3
ares_get_servers.pdf
ares_get_servers_ports.3
ares_get_servers_ports.pdf
ares_getenv.c
ares_getenv.h
ares_gethostbyaddr.3
ares_gethostbyaddr.c
ares_gethostbyaddr.pdf
ares_gethostbyname.3
ares_gethostbyname.c
ares_gethostbyname.pdf
ares_gethostbyname_file.3
ares_gethostbyname_file.pdf
ares_getnameinfo.3
ares_getnameinfo.c
ares_getnameinfo.pdf
ares_getopt.c
ares_getopt.h
ares_getsock.3
ares_getsock.c
ares_getsock.pdf
ares_inet_net_pton.h
ares_inet_ntop.3
ares_inet_ntop.pdf
ares_inet_pton.3
ares_inet_pton.pdf
ares_init.3
ares_init.c
ares_init.pdf
ares_init_options.3
ares_init_options.pdf
ares_iphlpapi.h
ares_ipv6.h
ares_library_cleanup.3
ares_library_cleanup.pdf
ares_library_init.3
ares_library_init.c
ares_library_init.h
ares_library_init.pdf
ares_library_initialized.3
ares_library_initialized.pdf
ares_llist.c
ares_llist.h
ares_mkquery.3
ares_mkquery.c
ares_mkquery.pdf
ares_nowarn.c
ares_nowarn.h
ares_options.c
ares_parse_a_reply.3
ares_parse_a_reply.c
ares_parse_a_reply.pdf
ares_parse_aaaa_reply.3
ares_parse_aaaa_reply.c
ares_parse_aaaa_reply.pdf
ares_parse_mx_reply.3
ares_parse_mx_reply.c
ares_parse_mx_reply.pdf
ares_parse_naptr_reply.3
ares_parse_naptr_reply.c
ares_parse_ns_reply.3
ares_parse_ns_reply.c
ares_parse_ns_reply.pdf
ares_parse_ptr_reply.3
ares_parse_ptr_reply.c
ares_parse_ptr_reply.pdf
ares_parse_soa_reply.3
ares_parse_soa_reply.c
ares_parse_soa_reply.pdf
ares_parse_srv_reply.3
ares_parse_srv_reply.c
ares_parse_srv_reply.pdf
ares_parse_txt_reply.3
ares_parse_txt_reply.c
ares_parse_txt_reply.pdf
ares_platform.c
ares_platform.h
ares_private.h
ares_process.3
ares_process.c
ares_process.pdf
ares_query.3
ares_query.c
ares_query.pdf
ares_rules.h
ares_save_options.3
ares_save_options.pdf
ares_search.3
ares_search.c
ares_search.pdf
ares_send.3
ares_send.c
ares_send.pdf
ares_set_local_dev.3
ares_set_local_dev.pdf
ares_set_local_ip4.3
ares_set_local_ip4.pdf
ares_set_local_ip6.3
ares_set_local_ip6.pdf
ares_set_servers.3
ares_set_servers.pdf
ares_set_servers_csv.3
ares_set_servers_csv.pdf
ares_set_servers_ports.3
ares_set_servers_ports.pdf
ares_set_servers_ports_csv.3
ares_set_servers_ports_csv.pdf
ares_set_socket_callback.3
ares_set_socket_callback.pdf
ares_set_socket_configure_callback.3
ares_set_socket_configure_callback.pdf
ares_set_sortlist.3
ares_set_sortlist.pdf
ares_setup.h
ares_strcasecmp.c
ares_strcasecmp.h
ares_strdup.c
ares_strdup.h
ares_strerror.3
ares_strerror.c
ares_strerror.pdf
ares_timeout.3
ares_timeout.c
ares_timeout.pdf
ares_version.3
ares_version.c
ares_version.h
ares_version.pdf
ares_writev.c
ares_writev.h
bitncmp.c
bitncmp.h
cares.rc
config-dos.h
config-win32.h
configure.ac
get_ver.awk
inet_net_pton.c
inet_ntop.c
libcares.pc.in
ltmain.sh
msvc_ver.inc
nameser.h
setup_once.h
windows_port.c
buildconf
compile
config.guess
config.sub
configure
depcomp
install-sh
maketgz
missing
mkinstalldirs
test-driver
README.msvc
___ __ _ _ __ ___ ___ / __| ___ / _` | '__/ _ \/ __| | (_ |___| (_| | | | __/\__ \ \___| \__,_|_| \___||___/ How to build c-ares using MSVC or Visual Studio ================================================= How to build using MSVC from the command line --------------------------------------------- Open a command prompt window and ensure that the environment is properly set up in order to use MSVC or Visual Studio compiler tools. Change to c-ares source folder where Makefile.msvc file is located and run: > nmake -f Makefile.msvc This will build all c-ares libraries as well as three sample programs. Once the above command has finished a new folder named MSVCXX will exist below the folder where makefile.msvc is found. The name of the folder depends on the MSVC compiler version being used to build c-ares. Below the MSVCXX folder there will exist four folders named 'cares', 'ahost', 'acountry', and 'adig'. The 'cares' folder is the one that holds the c-ares libraries you have just generated, the other three hold sample programs that use the libraries. The above command builds four versions of the c-ares library, dynamic and static versions and each one in release and debug flavours. Each of these is found in folders named dll-release, dll-debug, lib-release, and lib-debug, which hang from the 'cares' folder mentioned above. Each sample program also has folders with the same names to reflect which library version it is using. How to install using MSVC from the command line ----------------------------------------------- In order to allow easy usage of c-ares libraries it may be convenient to install c-ares libraries and header files to a common subdirectory tree. Once that c-ares libraries have been built using procedure described above, use same command prompt window to define environment variable INSTALL_DIR to designate the top subdirectory where installation of c-ares libraries and header files will be done. > set INSTALL_DIR=c:\c-ares Afterwards, run following command to actually perform the installation: > nmake -f Makefile.msvc install Installation procedure will copy c-ares libraries to subdirectory 'lib' and c-ares header files to subdirectory 'include' below the INSTALL_DIR subdir. When environment variable INSTALL_DIR is not defined, installation is done to c-ares source folder where Makefile.msvc file is located. How to build using Visual Studio 6 IDE -------------------------------------- A VC++ 6.0 reference workspace (vc6aws.dsw) is available within the 'vc' folder to allow proper building of the library and sample programs. 1) Open the vc6aws.dsw workspace with MSVC6's IDE. 2) Select 'Build' from top menu. 3) Select 'Batch Build' from dropdown menu. 4) Make sure that the sixteen project configurations are 'checked'. 5) Click on the 'Build' button. 6) Once the sixteen project configurations are built you are done. Dynamic and static c-ares libraries are built in debug and release flavours, and can be located each one in its own subdirectory, dll-debug, dll-release, lib-debug and lib-release, all of them below the 'vc\cares' subdirectory. In the same way four executable versions of each sample program are built, each using its respective library. The resulting sample executables are located in its own subdirectory, dll-debug, dll-release, lib-debug and lib-release, below the 'vc\acountry', 'vc\adig' and 'vc\ahost'folders. These reference VC++ 6.0 configurations are generated using the dynamic CRT. How to build using Visual Studio 2003 or newer IDE -------------------------------------------------- First you have to convert the VC++ 6.0 reference workspace and project files to the Visual Studio IDE version you are using, following next steps: 1) Open vc\vc6aws.dsw with VS20XX. 2) Allow VS20XX to update all projects and workspaces. 3) Save ALL and close VS20XX. 4) Open vc\vc6aws.sln with VS20XX. 5) Select batch build, check 'all' projects and click 'build' button. Same comments relative to generated files and folders as done above for Visual Studio 6 IDE apply here. Relationship between c-ares library file names and versions ----------------------------------------------------------- c-ares static release library version files: libcares.lib -> static release library c-ares static debug library version files: libcaresd.lib -> static debug library c-ares dynamic release library version files: cares.dll -> dynamic release library cares.lib -> import library for the dynamic release library cares.exp -> export file for the dynamic release library c-ares dynamic debug library version files: caresd.dll -> dynamic debug library caresd.lib -> import library for the dynamic debug library caresd.exp -> export file for the dynamic debug library caresd.pdb -> debug symbol file for the dynamic debug library How to use c-ares static libraries ---------------------------------- When using the c-ares static library in your program, you will have to define preprocessor symbol CARES_STATICLIB while building your program, otherwise you will get errors at linkage stage. Have Fun!