Name Date Size #Lines LOC

..22-Dec-2024-

Windows/H10-Apr-2024-

README.mdH A D22-Dec-20245.5 KiB153111

build-openssl.batH A D12-Jul-202422.2 KiB740639

checksrc.batH A D03-Aug-20247.8 KiB226200

generate.batH A D10-Apr-202410.8 KiB358316

README.md

1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3
4SPDX-License-Identifier: curl
5-->
6
7Building via IDE Project Files
8==============================
9
10This document describes how to compile, build and install curl and libcurl
11from sources using legacy versions of Visual Studio 2010 - 2013.
12
13You will need to generate the project files before using them. Please run
14"generate -help" for usage details.
15
16To generate project files for recent versions of Visual Studio instead, use
17cmake. Refer to INSTALL-CMAKE in the docs directory.
18
19Another way to build curl using Visual Studio is without project files. Refer
20to README in the winbuild directory.
21
22## Directory Structure
23
24The following directory structure is used for the legacy project files:
25
26    somedirectory\
27     |_curl
28       |_projects
29         |_<platform>
30           |_<ide>
31             |_lib
32             |_src
33
34This structure allows for side-by-side compilation of curl on the same machine
35using different versions of a given compiler (for example VC10 and VC12) and
36allows for your own application or product to be compiled against those
37variants of libcurl for example.
38
39Note: Typically this side-by-side compilation is generally only required when
40a library is being compiled against dynamic runtime libraries.
41
42## Dependencies
43
44The projects files also support build configurations that require third party
45dependencies such as OpenSSL and libssh2. If you wish to support these, you
46will also need to download and compile those libraries as well.
47
48To support compilation of these libraries using different versions of
49compilers, the following directory structure has been used for both the output
50of curl and libcurl as well as these dependencies.
51
52    somedirectory\
53     |_curl
54     | |_ build
55     |    |_<architecture>
56     |      |_<ide>
57     |        |_<configuration>
58     |          |_lib
59     |          |_src
60     |
61     |_openssl
62     | |_ build
63     |    |_<architecture>
64     |      |_VC <version>
65     |        |_<configuration>
66     |
67     |_libssh2
68       |_ build
69          |_<architecture>
70            |_VC <version>
71              |_<configuration>
72
73As OpenSSL doesn't support side-by-side compilation when using different
74versions of Visual Studio, a helper batch file has been provided to assist with
75this. Please run `build-openssl -help` for usage details.
76
77## Building with Visual C++
78
79To build with VC++, you will of course have to first install VC++ which is
80part of Visual Studio.
81
82Once you have VC++ installed you should launch the application and open one of
83the solution or workspace files. The VC directory names are based on the
84version of Visual C++ that you will be using. Each version of Visual Studio
85has a default version of Visual C++. We offer these versions:
86
87 - VC10      (Visual Studio 2010 Version 10.0)
88 - VC11      (Visual Studio 2012 Version 11.0)
89 - VC12      (Visual Studio 2013 Version 12.0)
90
91Separate solutions are provided for both libcurl and the curl command line
92tool as well as a solution that includes both projects. libcurl.sln, curl.sln
93and curl-all.sln, respectively. We recommend using curl-all.sln to build both
94projects.
95
96For example, if you are using Visual Studio 2010 then you should be able to
97use `VC10\curl-all.sln` to build curl and libcurl.
98
99## Running DLL based configurations
100
101If you are a developer and plan to run the curl tool from Visual Studio with
102any third-party libraries (such as OpenSSL or libssh2) then you will
103need to add the search path of these DLLs to the configuration's PATH
104environment. To do that:
105
106 1. Open the 'curl-all.sln' or 'curl.sln' solutions
107 2. Right-click on the 'curl' project and select Properties
108 3. Navigate to 'Configuration Properties > Debugging > Environment'
109 4. Add `PATH='Path to DLL';C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem`
110
111... where 'Path to DLL` is the configuration specific path. For example the
112following configurations in Visual Studio 2010 might be:
113
114DLL Debug - DLL OpenSSL (Win32):
115
116    PATH=..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;C:\Windows\System32;
117    C:\Windows;C:\Windows\System32\Wbem
118
119DLL Debug - DLL OpenSSL (x64):
120
121    PATH=..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;C:\Windows\System32;
122    C:\Windows;C:\Windows\System32\Wbem
123
124If you are using a configuration that uses multiple third-party library DLLs
125(such as DLL Debug - DLL OpenSSL - DLL libssh2) then 'Path to DLL' will need
126to contain the path to both of these.
127
128## Notes
129
130The following keywords have been used in the directory hierarchy:
131
132 - `<platform>`      - The platform (For example: Windows)
133 - `<ide>`           - The IDE (For example: VC10)
134 - `<architecture>`  - The platform architecture (For example: Win32, Win64)
135 - `<configuration>` - The target configuration (For example: DLL Debug, LIB
136   Release - LIB OpenSSL)
137
138Should you wish to help out with some of the items on the TODO list, or find
139bugs in the project files that need correcting, and would like to submit
140updated files back then please note that, whilst the solution files can be
141edited directly, the templates for the project files (which are stored in the
142git repository) will need to be modified rather than the generated project
143files that Visual Studio uses.
144
145## Legacy Windows and SSL
146
147Some of the project configurations use Schannel (Windows SSPI), the native SSL
148library that comes with the Windows OS. Schannel in Windows 8 and earlier is
149not able to connect to servers that no longer support the legacy handshakes
150and algorithms used by those versions. If you will be using curl in one of
151those earlier versions of Windows you should choose another SSL backend like
152OpenSSL.
153