README 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. Building via IDE Project Files
  2. ==============================
  3. This document describes how to compile, build and install curl and libcurl
  4. from sources using an IDE based development tool such as Visual Studio.
  5. Project files are available for several different Visual C++ versions. The
  6. following directory structure has been used to cater for this:
  7. somedirectory\
  8. |_curl
  9. |_projects
  10. |_<platform>
  11. |_<ide>
  12. |_lib
  13. |_src
  14. This structure allows for side-by-side compilation of curl on the same
  15. machine using different versions of a given compiler (for example VC10 and
  16. VC12) and allows for your own application or product to be compiled against
  17. those variants of libcurl for example.
  18. Note: Typically this side-by-side compilation is generally only required
  19. when a library is being compiled against dynamic runtime libraries.
  20. Dependencies
  21. ============
  22. The projects files also support build configurations that require third
  23. party dependencies such as OpenSSL, wolfSSL and libssh2. If you wish to
  24. support these, you will also need to download and compile those libraries
  25. as well.
  26. To support compilation of these libraries using different versions of
  27. compilers, the following directory structure has been used for both the
  28. output of curl and libcurl as well as these dependencies.
  29. somedirectory\
  30. |_curl
  31. | |_ build
  32. | |_<architecture>
  33. | |_<ide>
  34. | |_<configuration>
  35. | |_lib
  36. | |_src
  37. |
  38. |_openssl
  39. | |_ build
  40. | |_<architecture>
  41. | |_VC <version>
  42. | |_<configuration>
  43. |
  44. |_libssh2
  45. |_ build
  46. |_<architecture>
  47. |_VC <version>
  48. |_<configuration>
  49. As OpenSSL and wolfSSL don't support side-by-side compilation when using
  50. different versions of Visual Studio, build helper batch files have been
  51. provided to assist with this. Please run "build-openssl -help" and/or
  52. "build-wolfssl -help" for usage details.
  53. Building with Visual C++
  54. ========================
  55. To build with VC++, you will of course have to first install VC++ which is
  56. part of Visual Studio.
  57. If you require support for Internationalized Domain Names via Windows IDN
  58. then you will need either:
  59. * Microsoft Windows SDK Update for Windows Vista:
  60. https://www.microsoft.com/en-us/download/details.aspx?id=23719
  61. * Microsoft Visual Studio 2010 or above
  62. Once you have VC++ installed you should launch the application and open one
  63. of the solution or workspace files. The VC directory names are based on the
  64. version of Visual C++ that you will be using. Each version of Visual Studio
  65. has a default version of Visual C++. We offer these versions:
  66. - VC10 (Visual Studio 2010 Version 10.0)
  67. - VC11 (Visual Studio 2012 Version 11.0)
  68. - VC12 (Visual Studio 2013 Version 12.0)
  69. - VC14 (Visual Studio 2015 Version 14.0)
  70. - VC14.10 (Visual Studio 2017 Version 15.0)
  71. - VC14.30 (Visual Studio 2022 Version 17.0)
  72. Separate solutions are provided for both libcurl and the curl command line
  73. tool as well as a solution that includes both projects. libcurl.sln,
  74. curl.sln and curl-all.sln, respectively. We recommend using curl-all.sln to
  75. build both projects.
  76. For example, if you are using Visual Studio 2022 then you should be able to
  77. use VC14.30\curl-all.sln to build curl and libcurl.
  78. Running DLL based configurations
  79. ================================
  80. If you are a developer and plan to run the curl tool from Visual Studio (eg
  81. you are debugging) with any third-party libraries (such as OpenSSL, wolfSSL
  82. or LibSSH2) then you will need to add the search path of these DLLs to the
  83. configuration's PATH environment. To do that:
  84. * Open the 'curl-all.sln' or 'curl.sln' solutions
  85. * Right-click on the 'curl' project and select Properties
  86. * Navigate to 'Configuration Properties > Debugging > Environment'
  87. * Add PATH='Path to DLL';C:\Windows\system32;C:\Windows;
  88. C:\Windows\System32\Wbem
  89. ... where 'Path to DLL` is the configuration specific path. For example the
  90. following configurations in Visual Studio 2010 might be:
  91. DLL Debug - DLL OpenSSL (Win32):
  92. PATH=..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
  93. C:\Windows;C:\Windows\System32\Wbem
  94. DLL Debug - DLL OpenSSL (x64):
  95. PATH=..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
  96. C:\Windows;C:\Windows\System32\Wbem
  97. DLL Debug - DLL wolfSSL (Win32):
  98. PATH=..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
  99. C:\Windows;C:\Windows\System32\Wbem
  100. DLL Debug - DLL wolfSSL (x64):
  101. PATH=..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
  102. C:\Windows;C:\Windows\System32\Wbem
  103. If you are using a configuration that uses multiple third-party library DLLs
  104. (such as DLL Debug - DLL OpenSSL - DLL LibSSH2) then 'Path to DLL' will need
  105. to contain the path to both of these.
  106. Notes
  107. =====
  108. The following keywords have been used in the directory hierarchy:
  109. <platform> - The platform (For example: Windows)
  110. <ide> - The IDE (For example: VC10)
  111. <architecture> - The platform architecture (For example: Win32, Win64)
  112. <configuration> - The target configuration (For example: DLL Debug,
  113. LIB Release - LIB OpenSSL)
  114. If you are using the source code from the git repository, rather than a
  115. release archive or nightly build, you will need to generate the project
  116. files. Please run "generate -help" for usage details.
  117. Should you wish to help out with some of the items on the TODO list, or
  118. find bugs in the project files that need correcting, and would like to
  119. submit updated files back then please note that, whilst the solution files
  120. can be edited directly, the templates for the project files (which are
  121. stored in the git repository) will need to be modified rather than the
  122. generated project files that Visual Studio uses.
  123. Legacy Windows and SSL
  124. ======================
  125. Some of the project configurations allow the use of Schannel, the native
  126. SSL library in Windows which forms part of Windows SSPI. However, Schannel
  127. in Windows <= XP is unable to connect to servers that no longer support the
  128. legacy handshakes and algorithms used by those versions. If you will be
  129. using curl in one of those earlier versions of Windows you should choose
  130. another SSL backend such as OpenSSL.