README 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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 v15.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 Windows SDK Update for Windows Vista:
  62. https://www.microsoft.com/en-us/download/details.aspx?id=23719
  63. * Microsoft Visual Studio 2010 or above
  64. Once you have VC++ installed you should launch the application and open one
  65. of the solution or workspace files.
  66. Whilst files are provided for both libcurl and the curl command line tool as
  67. well as a configuration that includes both, it is recommend that you use the
  68. all-in-one configuration.
  69. Running DLL based configurations
  70. ================================
  71. If you are a developer and plan to run the curl tool from Visual Studio (eg
  72. you are debugging) with any third-party libraries (such as OpenSSL, wolfSSL
  73. or LibSSH2) then you will need to add the search path of these DLLs to the
  74. configuration's PATH environment. To do that:
  75. * Open the 'curl-all.sln' or 'curl.sln' solutions
  76. * Right-click on the 'curl' project and select Properties
  77. * Navigate to 'Configuration Properties > Debugging > Environment'
  78. * Add PATH='Path to DLL';C:\Windows\system32;C:\Windows;
  79. C:\Windows\System32\Wbem
  80. ... where 'Path to DLL` is the configuration specific path. For example the
  81. following configurations in Visual Studio 2010 might be:
  82. DLL Debug - DLL OpenSSL (Win32):
  83. PATH=..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
  84. C:\Windows;C:\Windows\System32\Wbem
  85. DLL Debug - DLL OpenSSL (x64):
  86. PATH=..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
  87. C:\Windows;C:\Windows\System32\Wbem
  88. DLL Debug - DLL wolfSSL (Win32):
  89. PATH=..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
  90. C:\Windows;C:\Windows\System32\Wbem
  91. DLL Debug - DLL wolfSSL (x64):
  92. PATH=..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
  93. C:\Windows;C:\Windows\System32\Wbem
  94. If you are using a configuration that uses multiple third-party library DLLs
  95. (such as DLL Debug - DLL OpenSSL - DLL LibSSH2) then 'Path to DLL' will need
  96. to contain the path to both of these.
  97. Notes
  98. =====
  99. The following keywords have been used in the directory hierarchy:
  100. <platform> - The platform (For example: Windows)
  101. <ide> - The IDE (For example: VC6, VC10, BCC5)
  102. <architecture> - The platform architecture (For example: Win32, Win64)
  103. <configuration> - The target configuration (For example: DLL Debug,
  104. LIB Release - LIB OpenSSL)
  105. If you are using the source code from the git repository, rather than a
  106. release archive or nightly build, you will need to generate the project
  107. files. Please run "generate -help" for usage details.
  108. Should you wish to help out with some of the items on the TODO list, or
  109. find bugs in the project files that need correcting, and would like to
  110. submit updated files back then please note that, whilst the solution files
  111. can be edited directly, the templates for the project files (which are
  112. stored in the git repositoty) will need to be modified rather than the
  113. generated project files that Visual Studio uses.
  114. Legacy Windows and SSL
  115. ======================
  116. Some of the project configurations allow the use of Schannel, the native
  117. SSL library in Windows which forms part of Windows SSPI. However, Schannel
  118. in Windows <= XP is unable to connect to servers that no longer support the
  119. legacy handshakes and algorithms used by those versions. If you will be
  120. using curl in one of those earlier versions of Windows you should choose
  121. another SSL backend such as OpenSSL.