<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://mg.to" xmlns:dc="https://purl.org/dc/elements/1.1/">
<channel>
 <title>mg.to - Energizer Project: Keeps Building and Building - Comments</title>
 <link>https://mg.to/2004/08/12/keeps-building-and-building</link>
 <description>Comments for &quot;Energizer Project: Keeps Building and Building&quot;</description>
 <language>en</language>
<item>
 <title>Energizer Project: Keeps Building and Building</title>
 <link>https://mg.to/2004/08/12/keeps-building-and-building</link>
 <description>&lt;p&gt;Did you ever have a Visual C++ project that won&amp;#8217;t stop building? It builds OK, but if you start the debugger or do another Ctrl+Shift+B, it says it&amp;#8217;s out of date and wants to build again? Every time?&lt;/p&gt;

&lt;p&gt;This happened to me and I was stumped. There was nothing in the Output window to tell me what was wrong. It looked like a perfectly successful build:&lt;/p&gt;

&lt;pre&gt;------ Build started: Project: Test,
Configuration: Debug Win32 ------

Compiling resources...
Linking...

Build log was saved at
&quot;file://c:&amp;#092;Test&amp;#092;Debug&amp;#092;BuildLog.htm&quot;
Test - 0 error(s), 0 warning(s)

-------------- Done --------------

    Build: 1 succeeded, 0 failed, 0 skipped&lt;/pre&gt;

&lt;p&gt;The only problem was it compiled those resources every time. It never thought they were up to date.&lt;/p&gt;

&lt;p&gt;I tried some Google searches. Nothing. This was annoying me, and the rest of my team.&lt;/p&gt;

&lt;p&gt;Finally, out of sheer frustration, I Ctrl+clicked on that &amp;#8220;Build log&amp;#8221; link, like the helpful tooltip suggested.&lt;/p&gt;

&lt;p&gt;Oh. Now it tells me:&lt;/p&gt;

&lt;pre&gt;Compiling resources...
Linking...

Test : warning PRJ0041 : Cannot find missing
dependency &#039;ICON_FILE&#039; for file &#039;Test.rc&#039;.
Your project may still build, but may
continue to appear out of date until this
file is found.&lt;/pre&gt;

&lt;p&gt;That gives me a desperately needed clue. Looking at Test.rc, I see that I&amp;#8217;d coded:&lt;/p&gt;

&lt;div style=&quot;padding: 5px !important; border: 1px solid rgb(253,187,134) !important; background-color: rgb(255,253,245) !important; font-family: Verdana,sans-serif !important;&quot;&gt;&lt;div style=&quot;background-color: rgb(255,250,238) !important;&quot;&gt;&lt;div class=&quot;geshi-dos&quot;&gt;&lt;div style=&quot;background-color:rgb(255,234,216);&quot;&gt;#ifdef DEMO&lt;br /&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; #define ICON_FILE &amp;quot;Icons\Demo.ico&amp;quot;&lt;br /&gt;
&lt;div style=&quot;background-color:rgb(255,234,216);&quot;&gt;#else &lt;br /&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; #define ICON_FILE &amp;quot;Icons\Full.ico&amp;quot;&lt;br /&gt;
&lt;div style=&quot;background-color:rgb(255,234,216);&quot;&gt;#endif&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color:rgb(255,234,216);&quot;&gt;&lt;span style=&quot;&quot;&gt;1&lt;/span&gt; ICON DISCARDABLE ICON_FILE &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Well, it sounded like a good idea at the time, honest.&lt;/p&gt;

&lt;p&gt;The resource compiler has no problem with this, but apparently the dependency checker can&amp;#8217;t handle it.&lt;/p&gt;

&lt;p&gt;Changing it to this fixed it:&lt;/p&gt;

&lt;div style=&quot;padding: 5px !important; border: 1px solid rgb(253,187,134) !important; background-color: rgb(255,253,245) !important; font-family: Verdana,sans-serif !important;&quot;&gt;&lt;div style=&quot;background-color: rgb(255,250,238) !important;&quot;&gt;&lt;div class=&quot;geshi-dos&quot;&gt;&lt;div style=&quot;background-color:rgb(255,234,216);&quot;&gt;#ifdef DEMO&lt;br /&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;&quot;&gt;1&lt;/span&gt; ICON DISCARDABLE &amp;quot;Icons\Demo.ico&amp;quot;&lt;br /&gt;
&lt;div style=&quot;background-color:rgb(255,234,216);&quot;&gt;#else &lt;br /&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;&quot;&gt;1&lt;/span&gt; ICON DISCARDABLE &amp;quot;Icons\Full.ico&amp;quot;&lt;br /&gt;
&lt;div style=&quot;background-color:rgb(255,234,216);&quot;&gt;#endif &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The Moral:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The information you need may be hiding behind a link. Just because the Output window has always told you about build problems doesn&amp;#8217;t mean it will tell you today.&lt;/li&gt;
&lt;li&gt;If your product has an Output window that &lt;em&gt;almost&lt;/em&gt; always provides complete information, fix it so it &lt;em&gt;always&lt;/em&gt; does.&lt;/li&gt;
&lt;/ul&gt;
</description>
 <comments>https://mg.to/2004/08/12/keeps-building-and-building#comments</comments>
 <category domain="https://mg.to/topics/programming/c-c">C/C++</category>
 <category domain="https://mg.to/topics/design">Design</category>
 <category domain="https://mg.to/topics/programming">Programming</category>
 <category domain="https://mg.to/topics/programming/win32.html">Win32</category>
 <pubDate>Thu, 12 Aug 2004 23:37:53 +0000</pubDate>
 <dc:creator>Michael Geary</dc:creator>
 <guid isPermaLink="false">18 at https://mg.to</guid>
</item>
</channel>
</rss>
