<?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[[SOLVED] subfolder .obj not generated when using CONFIG += object_parallel_to_source with nmake]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">So my original problem is that I have one project where multiple files from different folders have the same name. I cannot change the names because those folders are part of a library that was previously compiled with visual studio that I am trying to transfer to Qt creator (with a qmake based compilation).<br />
I saw that when   CONFIG += object_parallel_to_source is used the .obj are suposed to be placed in a replica of my project structure which solve the problem of the files with identical names.<br />
During the compilation i had linking error message telling me that some .obj files couldn't be found.</p>
<p dir="auto">So I tried it with a simpler project:<br />
project_folder:<br />
<em>-&gt;main.cpp<br />
-&gt;subfolder:<br />
-&gt;-&gt;func.h<br />
-&gt;-&gt;func.cpp</em></p>
<p dir="auto">with the func.h &amp; .cpp defining a simple "hello world" function that is called in the main</p>
<p dir="auto">The .pro file contains the following lines:</p>
<pre><code class="language-TEMPLATE">CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp \
        subfolder\func.cpp
HEADERS += subfolder\func.h
CONFIG += object_parallel_to_source
</code></pre>
<p dir="auto">When executing Qmake it indeed create all the new folder for the compilation.<br />
But when compiling I get a linking error indicating that the file func.obj can't be found:<br />
LNK1104: cannot open file 'debug\subfolder\func.obj'</p>
<p dir="auto">And indeed the files doesn't exist. And when checking the copilation steps the func.cpp file is not compiled ...</p>
<p dir="auto">Is there anything I did wrong to use the object_parallel_to_source option?</p>
<p dir="auto">Ah and I precise, I'm not compiling with a shadow build (but I tryed it also and it doesn't works anyway)</p>
]]></description><link>https://forum.qt.io/topic/59144/solved-subfolder-obj-not-generated-when-using-config-object_parallel_to_source-with-nmake</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 02:47:52 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/59144.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Sep 2015 15:23:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] subfolder .obj not generated when using CONFIG += object_parallel_to_source with nmake on Mon, 28 Sep 2015 22:11:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Good question, it might be a bug. You should check the <a href="http://bugreport.qt.io" target="_blank" rel="noopener noreferrer nofollow ugc">bug report system</a> for object_parallel_to_source to see if you find something about it.</p>
]]></description><link>https://forum.qt.io/post/291795</link><guid isPermaLink="true">https://forum.qt.io/post/291795</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 28 Sep 2015 22:11:34 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] subfolder .obj not generated when using CONFIG += object_parallel_to_source with nmake on Mon, 28 Sep 2015 11:39:22 GMT]]></title><description><![CDATA[<p dir="auto">Ok found the reason.<br />
The option CONFIG += object_parallel_to_source is currently bugged. Even if it create all the repertories to replicate the project folder it won't compile the .obj in them.</p>
<p dir="auto">Qmake produce compilation rules like this:</p>
<pre><code>{subfolder}.cpp{debug\}.obj::
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @&lt;&lt;
	$&lt;
&lt;&lt;
</code></pre>
<p dir="auto">but the one it should generate is</p>
<pre><code>{subfolder}.cpp{debug\subfolder}.obj::
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\subfolder @&lt;&lt;
	$&lt;
&lt;&lt;
</code></pre>
<p dir="auto">EDIT: To get it to work you have to add CONFIG += no_batch even if there are no filename conflicts. Why it's not automaticaly done when you use the CONFIG += object_parallel_to_source will stay a mystery ...</p>
]]></description><link>https://forum.qt.io/post/291727</link><guid isPermaLink="true">https://forum.qt.io/post/291727</guid><dc:creator><![CDATA[Ayuzawa]]></dc:creator><pubDate>Mon, 28 Sep 2015 11:39:22 GMT</pubDate></item></channel></rss>