<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>settings | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/settings/feed/" rel="self" type="application/rss+xml" />
	<link>https://learncgames.com</link>
	<description>A blog about C, programming games and my ebook(s).</description>
	<lastBuildDate>Wed, 29 Mar 2023 08:43:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://learncgames.com/wp-content/uploads/2020/03/cropped-favicon-32x32.png</url>
	<title>settings | Learn C Games Programming Blog</title>
	<link>https://learncgames.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">181446779</site>	<item>
		<title>Compiling C with Visual C++ 2022</title>
		<link>https://learncgames.com/compiling-c-with-visual-c-2022/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=compiling-c-with-visual-c-2022</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Tue, 28 Mar 2023 23:00:22 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[SDL]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[settings]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=3237</guid>

					<description><![CDATA[<p>It&#8217;s been a few years since I compiled the code for the first eBook and I needed to create an SDL application on Windows. I copied a project, as it was the fastest way to setup the include and lib paths, and the lib files needed to compile. Compared to clang/gcc on Linux, setting up [&#8230;]</p>
The post <a href="https://learncgames.com/compiling-c-with-visual-c-2022/">Compiling C with Visual C++ 2022</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignleft size-medium wp-image-3239" src="https://learncgames.com/wp-content/uploads/2023/03/u2ru4qbxa5q-300x200.jpg" alt="monitor displaying programming language" width="300" height="200" srcset="https://learncgames.com/wp-content/uploads/2023/03/u2ru4qbxa5q-300x200.jpg 300w, https://learncgames.com/wp-content/uploads/2023/03/u2ru4qbxa5q-1024x683.jpg 1024w, https://learncgames.com/wp-content/uploads/2023/03/u2ru4qbxa5q-768x512.jpg 768w, https://learncgames.com/wp-content/uploads/2023/03/u2ru4qbxa5q-1536x1024.jpg 1536w, https://learncgames.com/wp-content/uploads/2023/03/u2ru4qbxa5q.jpg 1600w" sizes="(max-width: 300px) 100vw, 300px" />It&#8217;s been a few years since I compiled the code for the first eBook and I needed to create an SDL application on Windows. I copied a project, as it was the fastest way to setup the <em>include</em> and <em>lib</em> paths, and the lib files needed to compile.</p>
<p>Compared to clang/gcc on Linux, setting up visual studio projects on Windows can be a bit of a pita. You&#8217;ve got to be careful not to mix up the x64 and x86 files, add everything twice (once for Win 32 and once for x64).</p>
<p>So I copied .sln and .vcxproj files, started compiling and kept getting this error:</p>
<p><em>Error LNK2019 unresolved external symbol main referenced in function &#8220;int __cdecl invoke_main(void)&#8221; (?invoke_main@@YAHXZ) maze D:\development\LinuxFormat\maze\MSVCRTD.lib(exe_main.obj) </em></p>
<p>I messed around with settings, still no joy. did a bit of searching around and found that some people fixed it by setting the Link System Subsystem but that didn&#8217;t fix it. Also one person had forgotten to add SDL2_main.lib to the list of lib files to be linked in.</p>
<p>Then I noticed the project was defaulting to 64-bit. I checked my includes and it was only setup for 32-bit. D&#8217;oh. So copying the settings from 32-bit to 64-bit fixed it.</p>The post <a href="https://learncgames.com/compiling-c-with-visual-c-2022/">Compiling C with Visual C++ 2022</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3237</post-id>	</item>
	</channel>
</rss>
