<?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>compiling | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/compiling/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>Mon, 23 Nov 2020 21:56: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>compiling | 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>Back on the Raspberry Pi</title>
		<link>https://learncgames.com/back-on-the-raspberry-pi/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=back-on-the-raspberry-pi</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Fri, 27 Nov 2020 00:00:51 +0000</pubDate>
				<category><![CDATA[raspberry-pi]]></category>
		<category><![CDATA[clang]]></category>
		<category><![CDATA[compiling]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=1901</guid>

					<description><![CDATA[<p>It has been a few months since I last used it and as you&#8217;d expect, it took a little bit of time and effort to get things back to what they were. I&#8217;m pretty good about backing things up and it took about 30 minutes to burn a new SD Card, update it, install VS [&#8230;]</p>
The post <a href="https://learncgames.com/back-on-the-raspberry-pi/">Back on the Raspberry Pi</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-full wp-image-1903" src="https://learncgames.com/wp-content/uploads/2020/11/pi-asteroids.png" alt="Pi Asteroids Development" width="450" height="256" srcset="https://learncgames.com/wp-content/uploads/2020/11/pi-asteroids.png 450w, https://learncgames.com/wp-content/uploads/2020/11/pi-asteroids-300x171.png 300w" sizes="(max-width: 450px) 100vw, 450px" />It has been a few months since I last used it and as you&#8217;d expect, it took a little bit of time and effort to get things back to what they were.</p>
<p>I&#8217;m pretty good about backing things up and it took about 30 minutes to burn a new SD Card, update it, install VS Code and the C/C++ extension, then copy my asteroids version over. I use <strong>WinSCP</strong> so had to enable <strong>SSH</strong> on the PI. It&#8217;s disabled by default but just tick a checkbox on the interface tab of the Preferences-&gt;Configuration menu.</p>
<p>Even then it didn&#8217;t compile. Of course I had to reinstall the dev versions of <strong>SDL, SDL_image, SDL_mixer and SDL_ttf</strong> and the <strong>clang</strong> compiler. Still it didn&#8217;t compile. I had created a <strong>Projects</strong> folder and created an <strong>Asteroids</strong> folder underneath that. I also had the Vs Code JSON files that you need for compiling C/C++. the main one of which is <strong>tasks.json</strong>. Those were in a folder <strong>.vscode</strong> which I had backed up but I&#8217;d copied it over into the wrong location. You want it located <strong>inside</strong> your VS Code folder.</p>
<p>This makes sense. If you have say five different projects then you are going to have a different build, link stuff per project. So you&#8217;ll have a unique <strong>.vscode</strong> in each folder. When you want to switch projects, you just close the Folder in the VS Code File menu and open it in the folder for the project that you next want to work on.</p>
<p>Mind you it still wouldn&#8217;t compile. It turned out my tasks.json has <strong>clang-6</strong> in it. When I did a <strong>clang &#8211;version</strong> on it, it told me it was clang 7.0.1. So I upped it to <strong>clang-7</strong> in tasks.json and that fixed it. It all compiled and ran.</p>
<p>Once you&#8217;ve done this a time or two it becomes 2nd nature but I can understand novices frustration; there are a lot of moving parts that all have to be right before you can even write and run C code. It&#8217;s not like other programming languages are really any better though. If you have setup virtual environments in Python and installed Python modules, you&#8217;ll know what it can be like.</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/back-on-the-raspberry-pi/">Back on the Raspberry Pi</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">1901</post-id>	</item>
		<item>
		<title>Compiling and linking C</title>
		<link>https://learncgames.com/compiling-and-linking-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=compiling-and-linking-c</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Thu, 22 Oct 2020 23:00:51 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[compiling]]></category>
		<category><![CDATA[Linking]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=1656</guid>

					<description><![CDATA[<p>So, if you are new to programming Compiling and linking can seem like magic. The compiler transforms C source code files into obj files. The actual format is different depending on the CPU and Operating system.  Linking is even more magic because it takes a bunch of obj files and produces a single executable. There&#8217;s [&#8230;]</p>
The post <a href="https://learncgames.com/compiling-and-linking-c/">Compiling and linking C</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:432,&quot;href&quot;:&quot;https:\/\/pixabay.com\/users\/fancycrave1-1115284\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=820275&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251222083909\/https:\/\/pixabay.com\/users\/fancycrave1-1115284\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 14:53:54&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-10 21:51:57&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-14 21:43:07&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-18 01:05:54&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-21 19:12:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-25 21:04:44&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-01 12:55:33&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-05 04:43:34&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-08 20:34:14&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-12 04:26:01&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-15 12:17:10&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-18 20:02:56&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-22 11:52:48&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-25 19:39:25&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-29 03:24:56&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-01 11:15:21&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-04 19:04:34&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-08 01:27:00&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-11 18:45:11&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-15 18:34:46&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-19 02:24:05&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-22 10:14:26&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-25 18:05:37&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-29 09:56:56&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-29 09:56:56&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:433,&quot;href&quot;:&quot;https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=820275&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260205102120\/https:\/\/pixabay.com\/?utm_source=link-attribution&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 14:53:59&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-10 21:52:01&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-14 13:43:18&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-18 01:05:54&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-21 19:12:49&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-02-25 13:05:50&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-01 04:55:56&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-04 20:44:19&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-07 22:12:56&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-11 12:26:52&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-14 20:18:08&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-18 04:06:39&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-21 19:54:31&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-25 03:42:25&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-03-28 07:04:10&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-01 03:15:39&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-04 11:06:29&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-08 01:26:56&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-11 18:45:10&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-15 02:35:03&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-18 10:27:46&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-21 18:16:45&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-25 02:08:56&quot;,&quot;http_code&quot;:403},{&quot;date&quot;:&quot;2026-04-28 17:59:29&quot;,&quot;http_code&quot;:403}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-28 17:59:29&quot;,&quot;http_code&quot;:403},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:434,&quot;href&quot;:&quot;https:\/\/hackthedeveloper.com\/c-program-compilation-process&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20250315082427\/https:\/\/hackthedeveloper.com\/c-program-compilation-process\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 14:54:10&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-10 13:52:45&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-14 05:44:55&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-17 21:33:02&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-21 19:12:54&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-25 05:07:08&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-28 20:57:04&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-04 12:44:59&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-07 16:37:35&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-11 12:26:56&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-14 20:18:13&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-18 04:06:44&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-21 19:54:35&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-25 03:42:32&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-28 07:04:12&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-01 02:43:02&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-04 11:06:33&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-08 01:27:07&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-11 18:45:17&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-15 10:34:24&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-18 18:25:50&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-22 02:16:15&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-25 10:07:33&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-29 01:58:29&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-29 01:58:29&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'></div>
<figure id="attachment_1657" aria-describedby="caption-attachment-1657" style="width: 300px" class="wp-caption alignleft"><img decoding="async" class="size-medium wp-image-1657" src="https://learncgames.com/wp-content/uploads/2020/10/code-820275_640-300x200.jpg" alt="Code" width="300" height="200" srcset="https://learncgames.com/wp-content/uploads/2020/10/code-820275_640-300x200.jpg 300w, https://learncgames.com/wp-content/uploads/2020/10/code-820275_640.jpg 640w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-1657" class="wp-caption-text">Image by <a href="https://pixabay.com/users/fancycrave1-1115284/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=820275">fancycrave1</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=820275">Pixabay</a></figcaption></figure>
<p>So, if you are new to programming Compiling and linking can seem like magic. The compiler transforms C source code files into obj files. The actual format is different depending on the CPU and Operating system.  Linking is even more magic because it takes a bunch of obj files and produces a single executable.</p>
<p>There&#8217;s actual more magic going on than my simplistic explanation. The compiler might be doing optimisation (generally in release mode but not debug). That makes debug compiles faster which is more desirable.</p>
<p>Another blog called <a title="Link to Hack the developer article about compiling" href="https://hackthedeveloper.com/c-program-compilation-process/" target="_blank" rel="nofollow noopener noreferrer">Hack the developer</a> has published an article with a lot more detail about compiling and linking. If you want to get a better understanding then this is a petty good piece. It uses Linux, GCC and Clang as examples. It also goes into more depth on the layout of obj files.</p>The post <a href="https://learncgames.com/compiling-and-linking-c/">Compiling and linking C</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">1656</post-id>	</item>
	</channel>
</rss>
