<?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>msvc | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/msvc/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, 02 Mar 2021 11:09:09 +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>msvc | 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>In praise of Visual Studio</title>
		<link>https://learncgames.com/in-praise-of-visual-studio/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=in-praise-of-visual-studio</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 00:00:56 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[C99]]></category>
		<category><![CDATA[msvc]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2814</guid>

					<description><![CDATA[<p>Looking at some of the posts on the C subreddit about recommendations for a text editor to help learn C, I see many people recommending editors like Sublime Text, Notepad (on Windows). I started programming in an era when IDEs were few and far between and an IDE is a wonderful time saving device. It [&#8230;]</p>
The post <a href="https://learncgames.com/in-praise-of-visual-studio/">In praise of Visual Studio</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;:126,&quot;href&quot;:&quot;https:\/\/www.reddit.com\/r\/C_Programming\/comments\/lv7klm\/a_good_text_editor_for_learning_c&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20250130021526\/https:\/\/www.reddit.com\/r\/C_Programming\/comments\/lv7klm\/a_good_text_editor_for_learning_c\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:10:39&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-10 12:08:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 01:01:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-28 01:36:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-12 08:09:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 16:06:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 13:44:59&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 13:44:59&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:127,&quot;href&quot;:&quot;https:\/\/visualstudio.microsoft.com\/downloads&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260205034014\/https:\/\/visualstudio.microsoft.com\/downloads\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 12:10:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 12:08:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 01:01:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-28 01:36:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-12 08:09:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-20 13:44:59&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-20 13:44:59&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img fetchpriority="high" decoding="async" class="alignleft  wp-image-2816" src="https://learncgames.com/wp-content/uploads/2021/03/visual-studio-1024x757.png" alt="Visual Studio debugging" width="699" height="517" srcset="https://learncgames.com/wp-content/uploads/2021/03/visual-studio-1024x757.png 1024w, https://learncgames.com/wp-content/uploads/2021/03/visual-studio-300x222.png 300w, https://learncgames.com/wp-content/uploads/2021/03/visual-studio-768x568.png 768w, https://learncgames.com/wp-content/uploads/2021/03/visual-studio.png 1147w" sizes="(max-width: 699px) 100vw, 699px" />Looking at some of the posts on the <a title="Link to C subreddit" href="https://www.reddit.com/r/C_Programming/comments/lv7klm/a_good_text_editor_for_learning_c/" target="_blank" rel="nofollow noopener">C subreddi</a>t about recommendations for a text editor to help learn C, I see many people recommending editors like Sublime Text, Notepad (<em>on Windows</em>).</p>
<p>I started programming in an era when IDEs were few and far between and an IDE is a wonderful time saving device. It is vastly superior to editing in a text editor then launching a compiler either by command or a batch file.</p>
<p>With an IDE you get immediate feedback on where the errors are, sometimes with a mini-map that lets you navigate directly to the error. It&#8217;s quicker to refactor code (<em>though that&#8217;s a function of an editor</em>) and usually one key press away from running or debugging.</p>
<p>Debugging in particular is very good in Visual Studio on Windows or Visual Studio Code on Windows/Linux/Mac. It&#8217;s visual, you can see multiple lines of code, add breakpoints and step through it with one key press.</p>
<p>I find line debuggers like GDB to be very frustrating by comparison.  Mousing over a variable and seeing its value in a debugger is a big time saver. Also seeing the stack calls and being able to jump to calls in the stack is handy.</p>
<p>Now if you are used to Linux, working in a terminal and compiling code through batch files then fine, but I believe its a bit of a hurdle for new programmers. An IDE makes it easy to switch from editing, compiling and debugging without leaving the program. It is all round more productive and easier to get into for a beginner.</p>
<p>So it&#8217;s worth at least trying out the free version (<em>Community Edition</em>) of <a title="Link to download page for Visual Studio" href="https://visualstudio.microsoft.com/downloads/" target="_blank" rel="nofollow noopener">Visual Studio</a> if you are on Windows.  The days when Microsoft hated Linux (<em>They called it a cancer!</em>) are long past.  And no I don&#8217;t get paid for advocating Visual Studio; I just like it. Considering that it&#8217;s completely free, it&#8217;s remarkable value.</p>The post <a href="https://learncgames.com/in-praise-of-visual-studio/">In praise of Visual Studio</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">2814</post-id>	</item>
		<item>
		<title>Comparing MSVC vs Clang</title>
		<link>https://learncgames.com/comparing-msvc-vs-clang/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=comparing-msvc-vs-clang</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Tue, 31 Mar 2020 23:00:12 +0000</pubDate>
				<category><![CDATA[Clang]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[clang]]></category>
		<category><![CDATA[msvc]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=275</guid>

					<description><![CDATA[<p>I originally created Asteroids for Windows using Visual Studio 2017 Community Edition. Since then I&#8217;ve started the Clang version on Ubuntu and there haven&#8217;t been too many differences but there are just a few so in this post I&#8217;ll list what I&#8217;ve found so far. Include Paths On Windows, I was able to get away [&#8230;]</p>
The post <a href="https://learncgames.com/comparing-msvc-vs-clang/">Comparing MSVC vs Clang</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="size-medium wp-image-277 alignleft" src="https://learncgames.com/wp-content/uploads/2020/03/codelisting-300x172.png" alt="Listing of some C code" width="300" height="172" srcset="https://learncgames.com/wp-content/uploads/2020/03/codelisting-300x172.png 300w, https://learncgames.com/wp-content/uploads/2020/03/codelisting.png 638w" sizes="(max-width: 300px) 100vw, 300px" />I originally created Asteroids for Windows using Visual Studio 2017 Community Edition. Since then I&#8217;ve started the Clang version on Ubuntu and there haven&#8217;t been too many differences but there are just a few so in this post I&#8217;ll list what I&#8217;ve found so far.</p>
<h3>Include Paths</h3>
<p>On Windows, I was able to get away with #include &lt;SDL.h&gt; but on Linux, I&#8217;ve had to include the path so it&#8217;s #include &lt;SDL2/SDL.h&gt;. This was probably because I included the full path in the MSVC configuration.</p>
<h3>Link Failures</h3>
<p>The asteroids.c code in chapter 29 uses sin and cos for the first time and the linker was unhappy with that. So in tasks.json, I&#8217;ve explicitly had to add it into args, along with SDL2 and SDL2_image,</p>
<pre><code class="language-c" data-line="">            &quot;args&quot;: [
                &quot;-g&quot;,
                &quot;${file}&quot;,&quot;${workspaceFolder}/Asteroids/hr_time.c&quot;,
                &quot;-o&quot;,
                &quot;${fileDirname}/asteroids&quot;,                
                &quot;-lSDL2&quot;,
                &quot;-lSDL2_image&quot;,
                &quot;-lm&quot;
            ],</code></pre>
<p>That &#8220;-lm&#8221; does that for maths.</p>
<h3>Safe functions</h3>
<p>Microsoft has its own set of safe functions many with an _s and extra length parameter.</p>
<p>On Linux, there don&#8217;t seem to be so many.</p>
<p>So sprintf_s on Windows becomes snprintf.</p>
<p>fopen_s just becomes standard fopen</p>
<h3>linux/time.h</h3>
<p>As well as time.h in the includes, I needed to add linux/time.h as well.</p>The post <a href="https://learncgames.com/comparing-msvc-vs-clang/">Comparing MSVC vs Clang</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">275</post-id>	</item>
	</channel>
</rss>
