<?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[Error while trying to set exe icon]]></title><description><![CDATA[<p dir="auto">Hello, I am trying to set my custom icon for my application but it gives me that error:<br />
@<br />
:-1: error: [release/testicon_res.o] Error 1<br />
@<br />
I am following that example:<br />
@<br />
win32:RC_FILE += testicon.rc<br />
@</p>
<p dir="auto">I have the testicon.rc and testicon.ico in my parent folder.<br />
@<br />
IDI_ICON1 ICON DISCARDABLE "/home/ilian/QT5/MathForFun/testicon.ico"<br />
@<br />
The paths are correct. Any Info?<br />
P.S. I am using MinGW qtcreator under wine.  Not the latest, pre-latest ver. Sorry, not good with numbers. 5.3.1 I think.</p>
]]></description><link>https://forum.qt.io/topic/49789/error-while-trying-to-set-exe-icon</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 06:36:06 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/49789.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Jan 2015 13:51:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Error while trying to set exe icon on Mon, 05 Jan 2015 23:57:33 GMT]]></title><description><![CDATA[<p dir="auto">I'm with SGaist on this one, I usually just do:</p>
<p dir="auto">@</p>
<h1>pro file</h1>
<p dir="auto">RC_FILE += app.rc<br />
@</p>
<p dir="auto">@</p>
<h1>app.rc</h1>
<p dir="auto">IDI_ICON1   ICON   DISCARDABLE   "my.ico"<br />
@</p>
<p dir="auto">Using a hardcoded path pretty much anywhere in code is a bad idea.  Especially if it is to your home dir.  But hardcoded paths in general are bad.</p>
<p dir="auto">Also, I tend to include my icon in a Qt resource file (.qrc) as well.  Then make sure I call setWindowIcon(QIcon(":/res/myicon.png")); in the QApplication.</p>
]]></description><link>https://forum.qt.io/post/256352</link><guid isPermaLink="true">https://forum.qt.io/post/256352</guid><dc:creator><![CDATA[ambershark]]></dc:creator><pubDate>Mon, 05 Jan 2015 23:57:33 GMT</pubDate></item><item><title><![CDATA[Reply to Error while trying to set exe icon on Mon, 05 Jan 2015 22:07:23 GMT]]></title><description><![CDATA[<p dir="auto">What version of windows is it ?</p>
]]></description><link>https://forum.qt.io/post/256327</link><guid isPermaLink="true">https://forum.qt.io/post/256327</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 05 Jan 2015 22:07:23 GMT</pubDate></item><item><title><![CDATA[Reply to Error while trying to set exe icon on Mon, 05 Jan 2015 10:43:29 GMT]]></title><description><![CDATA[<p dir="auto">Yes, it actually ran, but the executale is not with the icon, I`ve sat...<br />
[quote author="SGaist" date="1420410010"]Hi,</p>
<p dir="auto">When using a rc file I just give the name of the icon and ensure that it's in the same folder as the ico file.</p>
<p dir="auto">Hope it helps[/quote]</p>
]]></description><link>https://forum.qt.io/post/256254</link><guid isPermaLink="true">https://forum.qt.io/post/256254</guid><dc:creator><![CDATA[heatblazer]]></dc:creator><pubDate>Mon, 05 Jan 2015 10:43:29 GMT</pubDate></item><item><title><![CDATA[Reply to Error while trying to set exe icon on Sun, 04 Jan 2015 22:20:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">When using a rc file I just give the name of the icon and ensure that it's in the same folder as the ico file.</p>
<p dir="auto">Hope it helps</p>
]]></description><link>https://forum.qt.io/post/256190</link><guid isPermaLink="true">https://forum.qt.io/post/256190</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sun, 04 Jan 2015 22:20:10 GMT</pubDate></item></channel></rss>