<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Qt Creator not picking up changes to .cpp files, will not build unless I first clean the project?]]></title><description><![CDATA[<p dir="auto">Using Qt Creator 19.0.0 on Linux Ubuntu 24.04 (gcc_64) from <a href="https://code.qt.io/cgit/qt-creator/qt-creator.git/log/?id=99d590c8c980140ebbc0687552cdd77552b45111" target="_blank" rel="noopener noreferrer nofollow ugc">revision 99d590c8c9</a>:</p>
<p dir="auto">I was used to making little changes in a source file and then right-clicking the single file in the "Project" view, then choose "Build" from the context menu which should register that the file had changed and then re-compile the selected source file.</p>
<p dir="auto">Now, when I do the same, and after I save the file, I get this in the "Compile" output (for example, I want to compile "MySource.cpp"):</p>
<pre><code>make: Nothing to be done for '.obj/MySource.o'
</code></pre>
<p dir="auto">It isn't picking up the changes I just made.</p>
<p dir="auto">I consider this to be a bug ... does anyone have a workaround, or knows about a setting in "Preferences" which I can set to revert to the old behavior?</p>
<p dir="auto"><em>(EDIT: In my qmake project file, I have set a custom <code>OBJECTS_DIR</code> which is why there is a subfolder <code>.obj/</code> in the compiler output)</em></p>
]]></description><link>https://forum.qt.io/topic/164573/qt-creator-not-picking-up-changes-to-.cpp-files-will-not-build-unless-i-first-clean-the-project</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 17:21:29 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164573.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Apr 2026 10:41:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qt Creator not picking up changes to .cpp files, will not build unless I first clean the project? on Fri, 17 Apr 2026 13:06:34 GMT]]></title><description><![CDATA[<p dir="auto">The plot thickens...</p>
<p dir="auto">I cleaned out the entire build directory, including what I thought might have been a stale <code>.qmake.stash</code> file. After building everything successfully from scratch, I introduced an error by intentionally misspelling one of the variables in a function in <code>MySource.cpp</code>. Tried to compile that single file and got the same error as reported above.</p>
<p dir="auto">So I corrected the error, right-clicked once more on the file name in the "Projects" view, and now I have this error:</p>
<pre><code>:-1: error: No rule to make target '.obj/MySource.o'.  Stop.
</code></pre>
<p dir="auto">Once again, I click on the main "Build" icon on the bottom left, and everything successfully compiles and links. I tried to make a minimal project to reproduce the error, but I cannot pin it down. It doesn't seem to have anything to do with the presence of the <code>OBJECTS_DIR</code> variable. It could be that the source file is in a subproject of the main project which has <code>TEMPLATE=subdirs</code>. But the subproject is <code>TEMPLATE=app</code>. And this did work for many years (i.e. compiling a single file from the "Projects" view context menu). Something has broken recently.</p>
]]></description><link>https://forum.qt.io/post/837818</link><guid isPermaLink="true">https://forum.qt.io/post/837818</guid><dc:creator><![CDATA[Robert Hairgrove]]></dc:creator><pubDate>Fri, 17 Apr 2026 13:06:34 GMT</pubDate></item></channel></rss>