<?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>extensions | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/extensions/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>Tue, 16 Mar 2021 12:07:21 +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>extensions | 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>Interesting gcc/clang extensions to C</title>
		<link>https://learncgames.com/interesting-gcc-clang-extensions-to-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=interesting-gcc-clang-extensions-to-c</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Thu, 18 Mar 2021 00:00:49 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Clang]]></category>
		<category><![CDATA[clang]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[gcc]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2903</guid>

					<description><![CDATA[<p>Both gcc and clang support extensions to C and while i normally try and make things I write about work on Windows (i.e. Visual Studio), these are useful enough that I thought they deserve a mention. Yes I know you can run gcc/clang on Windows using Cygwin or MinGW, but for various reasons I prefer [&#8230;]</p>
The post <a href="https://learncgames.com/interesting-gcc-clang-extensions-to-c/">Interesting gcc/clang extensions to C</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="alignleft wp-image-2905 size-medium" src="https://learncgames.com/wp-content/uploads/2021/03/c-example-1-300x70.png" alt="C Example" width="300" height="70" srcset="https://learncgames.com/wp-content/uploads/2021/03/c-example-1-300x70.png 300w, https://learncgames.com/wp-content/uploads/2021/03/c-example-1.png 507w" sizes="(max-width: 300px) 100vw, 300px" />Both gcc and clang support extensions to C and while i normally try and make things I write about work on Windows (<em>i.e. Visual Studio</em>), these are useful enough that I thought they deserve a mention. Yes I know you can run gcc/clang on Windows using Cygwin or MinGW, but for various reasons I prefer Visual Studio.</p>
<p>You can add a constructor and destructor functions to a C program; the constructor function runs before main() and the destructor after main().</p>
<p>The syntax is not exactly clean or obvious (<em>those are double underscores before and after the word <strong>attribute</strong> like Python dunders!</em>) but I got this program to compile/run with clang 10 on Ubuntu as the screenshot shows.  Here&#8217;s a listing. I called the two functions ctor and dtor but you can use anything.</p>
<pre><code class="language-c" data-line="">#include &lt;stdio.h&gt;

__attribute__((constructor)) void ctor(void)
{
  printf(&quot;Constructor runs first\n&quot;);
}

__attribute__((destructor)) void dtor(void)
{
  printf(&quot;Destructor runs last\n&quot;);
}

int main() {
    printf(&quot;Main\n&quot;);
}</code></pre>
<p>The output  is:</p>
<pre>david@DavidPC:~/Projects/Examples$ ./ex1
Constructor runs first
Main
Destructor runs last</pre>The post <a href="https://learncgames.com/interesting-gcc-clang-extensions-to-c/">Interesting gcc/clang extensions to 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">2903</post-id>	</item>
		<item>
		<title>Looking at C/C++ extensions for VS Code.</title>
		<link>https://learncgames.com/looking-at-c-c-extensions-for-vs-code/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=looking-at-c-c-extensions-for-vs-code</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sun, 14 Mar 2021 00:00:16 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Visual Studio Code]]></category>
		<category><![CDATA[extensions]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2875</guid>

					<description><![CDATA[<p>I was curious as to how many C extensions there are for VS Code. If you visit the marketplace (not a great name- all are free-some market!) in a browser, you can search through the (currently) 24,779 available extensions. Finding C extensions is not easy. A search for C returns almost 16,000 results. C++  is [&#8230;]</p>
The post <a href="https://learncgames.com/looking-at-c-c-extensions-for-vs-code/">Looking at C/C++ extensions for VS Code.</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;:102,&quot;href&quot;:&quot;https:\/\/marketplace.visualstudio.com\/VSCode&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260206115959\/https:\/\/marketplace.visualstudio.com\/VSCode&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-13 06:00:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-25 15:59:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 10:33:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-09 22:47:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-17 11:19:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-04 23:32:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 13:38:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-17 07:37:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-21 03:50:51&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 03:50:51&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:103,&quot;href&quot;:&quot;https:\/\/github.com\/resurrecting-open-source-projects\/scrot&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251114001805\/https:\/\/github.com\/resurrecting-open-source-projects\/scrot&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:57:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-13 06:00:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-25 15:59:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 08:28:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-09 22:47:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-17 11:19:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 23:32:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-11 03:17:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 14:39:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 09:38:24&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 09:38:24&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:104,&quot;href&quot;:&quot;https:\/\/wiki.gnome.org\/Apps\/Gthumb&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260122005552\/https:\/\/wiki.gnome.org\/Apps\/Gthumb&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:58:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-13 06:00:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-25 15:59:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-09 22:47:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-17 11:20:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 23:32:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-13 09:41:20&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-18 02:47:27&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-21 05:28:58&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 05:28:58&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:105,&quot;href&quot;:&quot;https:\/\/github.com\/resurrecting-open-source-projects\/scrot\/blob\/master\/CONTRIBUTING.md&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20250926140946\/https:\/\/github.com\/resurrecting-open-source-projects\/scrot\/blob\/master\/CONTRIBUTING.md&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 11:58:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-13 06:00:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-27 11:02:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-09 22:47:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-17 11:20:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-05 05:15:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-13 13:38:38&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-04-18 02:47:30&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-04-21 05:28:58&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-21 05:28:58&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img fetchpriority="high" decoding="async" class="alignleft wp-image-2876 " src="https://learncgames.com/wp-content/uploads/2021/03/2021-03-12-194401_1600x900_scrot-e1615578522784-300x199.png" alt="VS Code C++ extensions" width="283" height="188" srcset="https://learncgames.com/wp-content/uploads/2021/03/2021-03-12-194401_1600x900_scrot-e1615578522784-300x199.png 300w, https://learncgames.com/wp-content/uploads/2021/03/2021-03-12-194401_1600x900_scrot-e1615578522784-1024x681.png 1024w, https://learncgames.com/wp-content/uploads/2021/03/2021-03-12-194401_1600x900_scrot-e1615578522784-768x511.png 768w, https://learncgames.com/wp-content/uploads/2021/03/2021-03-12-194401_1600x900_scrot-e1615578522784.png 1167w" sizes="(max-width: 283px) 100vw, 283px" />I was curious as to how many C extensions there are for VS Code. If you visit the <a title="Link to VS Code marketplace for extensions" href="https://marketplace.visualstudio.com/VSCode" target="_blank" rel="nofollow noopener">marketplace</a> (<em>not a great name- all are free-some market!</em>) in a browser, you can search through the (<em>currently</em>) 24,779 available extensions.</p>
<p>Finding C extensions is not easy. A search for C returns almost 16,000 results. C++  is a better thing to search on and gives 207 results, many of which are for C and C++. You can also search in VS Code but it&#8217;s easier in a web browser.</p>
<p>Even that&#8217;s probably too much but you can use the showing pull down to see how many extensions are in the various categories. If for instance you select Debuggers, then you will only see 18 extensions.</p>
<p><img decoding="async" class="alignleft size-medium wp-image-2878" src="https://learncgames.com/wp-content/uploads/2021/03/menu-193x300.png" alt="VS Code Extensions showing" width="193" height="300" srcset="https://learncgames.com/wp-content/uploads/2021/03/menu-193x300.png 193w, https://learncgames.com/wp-content/uploads/2021/03/menu.png 194w" sizes="(max-width: 193px) 100vw, 193px" /></p>
<p>Note: As I&#8217;m still only my old creaky Ubuntu laptop, I had to use <a title="Link to scrot on GitHub" href="https://github.com/resurrecting-open-source-projects/scrot" target="_blank" rel="nofollow noopener">scrot</a> for screen capture and <a title="Link to gThumb on Gnom.org Wiki" href="https://wiki.gnome.org/Apps/Gthumb" target="_blank" rel="nofollow noopener">gthumb</a> for editing the image.  Note, the scrot project is looking for a programmer to look after it. Here is h<a title="Link to scrot contribution document" href="https://github.com/resurrecting-open-source-projects/scrot/blob/master/CONTRIBUTING.md" target="_blank" rel="nofollow noopener">ow to contribute</a> to the project.</p>The post <a href="https://learncgames.com/looking-at-c-c-extensions-for-vs-code/">Looking at C/C++ extensions for VS Code.</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">2875</post-id>	</item>
	</channel>
</rss>
