<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Vcpkg on kenji.blog</title><link>http://kenji.blog/en/tags/vcpkg/</link><description>Recent content in Vcpkg on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Mon, 07 Jul 2025 21:46:08 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/tags/vcpkg/index.xml" rel="self" type="application/rss+xml"/><item><title>[For Beginners] Steps to Install libcurl (with OpenSSL support) in Visual Studio using vcpkg</title><link>http://kenji.blog/en/p/vcpkg-%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6-visual-studio-%E3%81%AB-curl-%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/</link><pubDate>Mon, 07 Jul 2025 21:46:08 +0900</pubDate><guid>http://kenji.blog/en/p/vcpkg-%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6-visual-studio-%E3%81%AB-curl-%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/</guid><description>&lt;img src="http://kenji.blog/p/vcpkg-%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6-visual-studio-%E3%81%AB-curl-%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/img.png" alt="Featured image of post [For Beginners] Steps to Install libcurl (with OpenSSL support) in Visual Studio using vcpkg" />&lt;h2 id="for-using-libcurl-with-openssl-support-in-visual-studio-vcpkg-is-easy-and-recommended">For using libcurl (with OpenSSL support) in Visual Studio, vcpkg is easy and recommended
&lt;/h2>&lt;p>When you want to handle HTTP communication in C++, &lt;code>libcurl&lt;/code> is often used. However, adjusting builds and dependencies can be unexpectedly troublesome, right?&lt;/p>
&lt;p>In such cases, the Microsoft-made C++ library management tool &amp;ldquo;&lt;strong>vcpkg&lt;/strong>&amp;rdquo; is very useful.
This time, we will introduce the steps from introducing &lt;code>libcurl&lt;/code> (with OpenSSL support) using &lt;code>vcpkg&lt;/code> to making it smooth to use in Visual Studio.&lt;/p>
&lt;hr>
&lt;h3 id="installing-vcpkg-only-for-those-who-havent-installed-it-yet">Installing vcpkg (Only for those who haven&amp;rsquo;t installed it yet)
&lt;/h3>&lt;p>First, let&amp;rsquo;s install &lt;code>vcpkg&lt;/code>. Please run the following steps in PowerShell.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="n">git&lt;/span> &lt;span class="n">clone&lt;/span> &lt;span class="n">https&lt;/span>&lt;span class="err">:&lt;/span>&lt;span class="p">//&lt;/span>&lt;span class="n">github&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">com&lt;/span>&lt;span class="p">/&lt;/span>&lt;span class="n">microsoft&lt;/span>&lt;span class="p">/&lt;/span>&lt;span class="n">vcpkg&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">cd &lt;/span>&lt;span class="n">vcpkg&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">.\&lt;/span>&lt;span class="nb">bootstrap-vcpkg&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="py">bat&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ul>
&lt;li>If Git is not installed yet, please install it from the &lt;a class="link" href="https://git-scm.com/" target="_blank" rel="noopener"
>Git official website&lt;/a>.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="installing-libcurl-with-openssl-support">Installing libcurl (with OpenSSL support)
&lt;/h3>&lt;p>Next, we will use vcpkg to install &lt;code>libcurl&lt;/code>. To specify the 64bit version with OpenSSL support, run the following command.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="n">vcpkg&lt;/span> &lt;span class="n">install&lt;/span> &lt;span class="n">curl&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="no">ssl&lt;/span>&lt;span class="p">]&lt;/span> &lt;span class="p">-&lt;/span>&lt;span class="n">-triplet&lt;/span> &lt;span class="nb">x64-windows&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>When this command is run, necessary dependencies (such as OpenSSL) are also set up automatically.&lt;/p>
&lt;hr>
&lt;h3 id="integration-settings-with-visual-studio">Integration settings with Visual Studio
&lt;/h3>&lt;p>To easily use the library introduced by vcpkg from a Visual Studio project, configure the integration setting with the following command.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="n">vcpkg&lt;/span> &lt;span class="n">integrate&lt;/span> &lt;span class="n">install&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>By doing this setting, &lt;code>#include &amp;lt;curl/curl.h&amp;gt;&lt;/code> can be automatically used in Visual Studio projects, eliminating the need to manually set up library paths and linker settings.&lt;/p>
&lt;hr>
&lt;h2 id="conclusion">Conclusion
&lt;/h2>&lt;p>With this, the preparation to introduce &lt;code>libcurl&lt;/code> (with OpenSSL support) into Visual Studio is complete.&lt;/p>
&lt;ul>
&lt;li>With vcpkg, troublesome dependencies can be managed all at once.&lt;/li>
&lt;li>Easily introduce libcurl with &lt;code>vcpkg install curl[ssl] --triplet x64-windows&lt;/code>&lt;/li>
&lt;li>Automatic integration with Visual Studio is possible with &lt;code>vcpkg integrate install&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>After this, just include the header in your project and start developing using the libcurl API.
Please utilize the convenient vcpkg and dramatically increase your development efficiency.&lt;/p></description></item></channel></rss>