<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — libcurl not linking properly in vscode with msvc 2022]]></title>
		<link>https://www.wolfssl.com/forums/topic2186-libcurl-not-linking-properly-in-vscode-with-msvc-2022.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic2186.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in libcurl not linking properly in vscode with msvc 2022.]]></description>
		<lastBuildDate>Mon, 07 Oct 2024 13:45:51 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: libcurl not linking properly in vscode with msvc 2022]]></title>
			<link>https://www.wolfssl.com/forums/post7924.html#p7924</link>
			<description><![CDATA[<p>Hi Andids</p><p>Welcome to the wolfSSL Forums.</p><p>Could you tell us a bit about your Curl project and your location for our support records?</p><p>Did you review the Cmake instructions?<br /><a href="https://github.com/curl/curl/blob/master/docs/INSTALL-CMAKE.md">https://github.com/curl/curl/blob/maste … L-CMAKE.md</a></p><p>Thanks,<br />Eric - wolfSSL Support</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Mon, 07 Oct 2024 13:45:51 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7924.html#p7924</guid>
		</item>
		<item>
			<title><![CDATA[libcurl not linking properly in vscode with msvc 2022]]></title>
			<link>https://www.wolfssl.com/forums/post7923.html#p7923</link>
			<description><![CDATA[<p>I&#039;m trying to use libcurl in vscode with the MSVC 2022 compiler and linker but im getting a lot of linking errors. I am a noob so I probably did a dumb mistake.</p><br /><p>I first built libcurl from source code using the x64 VS tools command prompt with the following command:</p><p>nmake /f Makefile.vc mode=static</p><br /><p>I got a libcurl_a.lib file and some include headers so I added those to my project with the code:</p><p>#include &lt;stdio.h&gt;</p><p>#include &lt;stdlib.h&gt;</p><p>#include &lt;string.h&gt;</p><p>#include &lt;conio.h&gt;</p><p>#include &quot;curl\curl.h&quot;</p><br /><p>I then launched vscode from x64 VS tools and used the following command:</p><p>cl /std:c17 /Iinclude src/main.c /link /LIBPATH:lib <a href="https://geometrydashbreeze.com"><span style="color: white">geometry dash breeze</span></a></p><br /><p>Instead of it giving me an exe, I got a bunch of unresolved external symbol errors and the obj file.</p><br /><p>My libcurl_a.lib file is in the lib folder, all the headers are in the include\curl folder, and main.c is in the src folder.</p><br /><p>Here&#039;s the output:</p><p>Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32822 for x64</p><p>Copyright (C) Microsoft Corporation. All rights reserved.</p><br /><p>main.c</p><p>Microsoft (R) Incremental Linker Version 14.37.32822.0</p><p>Copyright (C) Microsoft Corporation. All rights reserved.</p><br /><p>/out:main.exe</p><p>/LIBPATH:lib</p><p>main.obj</p><p>main.obj : error LNK2019: unresolved external symbol curl_global_init referenced in function main</p><p>main.obj : error LNK2019: unresolved external symbol curl_global_cleanup referenced in function main</p><p>main.obj : error LNK2019: unresolved external symbol curl_easy_init referenced in function main</p><p>main.obj : error LNK2019: unresolved external symbol curl_easy_cleanup referenced in function main</p><p>main.exe : fatal error LNK1120: 4 unresolved externals</p><br /><p>I&#039;ve tried putting #define CURL_STATICLIB and #pragma comment(lib, &quot;lib\libcurl_a.lib&quot;) but those don&#039;t fix it either.</p>]]></description>
			<author><![CDATA[null@example.com (Andids)]]></author>
			<pubDate>Mon, 07 Oct 2024 10:19:36 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7923.html#p7923</guid>
		</item>
	</channel>
</rss>
