README 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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 currently available for Visual C++ v6.0 to v14.0. 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 VC8, VC9
  16. and VC10) and allows for your own application or product to be compiled
  17. against 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 SSH2. If you wish to support
  24. these, you will also need to download and compile those libraries as well.
  25. To support compilation of these libraries using different versions of
  26. compilers, the following directory structure has been used for both the
  27. output of curl and libcurl as well as these dependencies.
  28. somedirectory\
  29. |_curl
  30. | |_ build
  31. | |_<architecture>
  32. | |_<ide>
  33. | |_<configuration>
  34. | |_lib
  35. | |_src
  36. |
  37. |_openssl
  38. | |_ build
  39. | |_<architecture>
  40. | |_VC <version>
  41. | |_<configuration>
  42. |
  43. |_libssh2
  44. |_ build
  45. |_<architecture>
  46. |_VC <version>
  47. |_<configuration>
  48. As OpenSSL and wolfSSL don't support side-by-side compilation when using
  49. different versions of Visual Studio, build helper batch files have been
  50. provided to assist with this. Please run "build-openssl -help" and/or
  51. "build-wolfssl -help" for usage details.
  52. Building with Visual C++
  53. ========================
  54. To build with VC++, you will of course have to first install VC++ which is
  55. part of Visual Studio.
  56. If you are building with VC6 then you will also need the February 2003
  57. Edition of the Windows Platform SDK which can be downloaded from:
  58. https://www.microsoft.com/en-us/download/details.aspx?id=12261
  59. If you require support for Internationalized Domain Names via Windows IDN
  60. then you will need either:
  61. * Microsoft Internationalized Domain Name (IDN) Mitigation APIs:
  62. https://www.microsoft.com/en-us/download/details.aspx?id=734
  63. * Microsoft Windows SDK Update for Windows Vista:
  64. https://www.microsoft.com/en-us/download/details.aspx?id=23719
  65. * Microsoft Visual Studio 2010 or above
  66. Once you have VC++ installed you should launch the application and open one
  67. of the solution or workspace files.
  68. Whilst files are provided for both libcurl and the curl command line tool as
  69. well as a configuration that includes both, it is recommend that you use the
  70. all-in-one configuration.
  71. Running DLL based configurations
  72. ================================
  73. If you are a developer and plan to run the curl tool from Visual Studio (eg
  74. you are debugging) with any third-party libraries (such as OpenSSL, wolfSSL
  75. or LibSSH2) then you will need to add the search path of these DLLs to the
  76. configuration's PATH environment. To do that:
  77. * Open the 'curl-all.sln' or 'curl.sln' solutions
  78. * Right-click on the 'curl' project and select Properties
  79. * Navigate to 'Configuration Properties > Debugging > Environment'
  80. * Add PATH='Path to DLL';C:\Windows\system32;C:\Windows;
  81. C:\Windows\System32\Wbem
  82. ... where 'Path to DLL` is the configuration specific path. For example the
  83. following configurations in Visual Studio 2010 might be:
  84. DLL Debug - DLL OpenSSL (Win32):
  85. PATH=..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
  86. C:\Windows;C:\Windows\System32\Wbem
  87. DLL Debug - DLL OpenSSL (x64):
  88. PATH=..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
  89. C:\Windows;C:\Windows\System32\Wbem
  90. DLL Debug - DLL wolfSSL (Win32):
  91. PATH=..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
  92. C:\Windows;C:\Windows\System32\Wbem
  93. DLL Debug - DLL wolfSSL (x64):
  94. PATH=..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
  95. C:\Windows;C:\Windows\System32\Wbem
  96. If you are using a configuration that uses multiple third-party library DLLs
  97. (such as DLL Debug - DLL OpenSSL - DLL LibSSH2) then 'Path to DLL' will need
  98. to contain the path to both of these.
  99. Notes
  100. =====
  101. The following keywords have been used in the directory hierarchy:
  102. <platform> - The platform (For example: Windows)
  103. <ide> - The IDE (For example: VC6, VC10, BCC5)
  104. <architecture> - The platform architecture (For example: Win32, Win64)
  105. <configuration> - The target configuration (For example: DLL Debug,
  106. LIB Release - LIB OpenSSL)
  107. If you are using the source code from the git repository, rather than a
  108. release archive or nightly build, you will need to generate the project
  109. files. Please run "generate -help" for usage details.
  110. Should you wish to help out with some of the items on the TODO list, or
  111. find bugs in the project files that need correcting, and would like to
  112. submit updated files back then please note that, whilst the solution files
  113. can be edited directly, the templates for the project files (which are
  114. stored in the git repositoty) will need to be modified rather than the
  115. generated project files that Visual Studio uses.
  116. Legacy Windows and SSL
  117. ======================
  118. Some of the project configurations allow the use of WinSSL (specifically
  119. SChannel from Windows SSPI), the native SSL library in Windows. However,
  120. WinSSL in Windows <= XP is unable to connect to servers that no longer
  121. support the legacy handshakes and algorithms used by those versions. If
  122. you will be using curl in one of those earlier versions of Windows you
  123. should choose another SSL backend such as OpenSSL.