Hack Forums
[C] using libcurl (having some .dll missing) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] using libcurl (having some .dll missing) (/showthread.php?tid=5897808)

Pages: Pages 1 2


RE: using libcurl (having some .dll missing) - HFDone - Oct 23, 2018

libcurl precompiled windows https://github.com/HazeProductions/libcurl


RE: using libcurl (having some .dll missing) - ✪ BL4ZE - Oct 23, 2018

No, Don't do that you don't have do all these stuff to setup curl, If I tell you there is a better way of doing it.
Let's follow.
1. Download https://github.com/Microsoft/vcpkg
2. Extract it to any folder you like
3. Build vcpkg by running "bootstrap-vcpkg.bat"
4. Open "x86 Native Tools Command Prompt for Visual Studio 2017" ( You can search it in Start Menu)
5. In command prompt navigate to the location of vcpkg
6. Type these commands -
vcpkg integrate install
vcpkg install curl:x86-windows-static
7. Wait for installation to finish
8. Add these two lines between global tags in .csproj file of your Project

<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>

Example :-

<PropertyGroup Label="Globals">
<!-- .... -->

<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>

</PropertyGroup>

9. You're done now you can include curl
by using #include <curl/curl.h>
and you don't need dll's anymore.