<?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[Problem with INCPATH]]></title><description><![CDATA[<p dir="auto">I'm newbie, so please have patience with me.<br />
I'm using Ubuntu and I have installed Qt 5.1.0 from .run file. QtCreator 2.8 got installed also.<br />
I added these lines to my .bashrc file:<br />
@<br />
export QTDIR=/opt/Qt5.1.0/5.1.0/gcc<br />
export PATH=$QTDIR/bin:$PATH<br />
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH<br />
@</p>
<p dir="auto">I tried to comile simple example application:<br />
@<br />
#include &lt;QApplication&gt;<br />
#include &lt;QLabel&gt;</p>
<p dir="auto">int main(int argc, char *argv[])<br />
{<br />
QApplication app(argc,argv);<br />
QLabel *label = new QLabel("Hello Qt!");<br />
label-&gt;show();<br />
return app.exec();<br />
}<br />
@</p>
<p dir="auto">I did "qmake -project", and "qmake <a href="http://hello.pro" target="_blank" rel="noopener noreferrer nofollow ugc">hello.pro</a>", and then I typed "make".<br />
And that gives me error:<br />
"hello.cpp:1:24: fatal error: QApplication: No such file or directory<br />
compilation terminated."</p>
<p dir="auto">The problem seems to be in qmake. When I make project with QtCreator it's Makefile has different INCPATH variable, and this phase goes without problem (there are other problems but it's  another question).<br />
This is INCPATH variable in Makefile created through QtCreator:</p>
<p dir="auto">"INCPATH       = -I/opt/Qt5.1.0/5.1.0/gcc/mkspecs/linux-g++ -I../helloQtCreator -I/opt/Qt5.1.0/5.1.0/gcc/include -I/opt/Qt5.1.0/5.1.0/gcc/include/QtWidgets -I/opt/Qt5.1.0/5.1.0/gcc/include/QtGui -I/opt/Qt5.1.0/5.1.0/gcc/include/QtCore -I. -I. -I."</p>
<p dir="auto">And this one is created by qmake through terminal:</p>
<p dir="auto">"INCPATH       = -I/opt/Qt5.1.0/5.1.0/gcc/mkspecs/linux-g++ -I. -I. -I/opt/Qt5.1.0/5.1.0/gcc/include -I/opt/Qt5.1.0/5.1.0/gcc/include/QtGui -I/opt/Qt5.1.0/5.1.0/gcc/include/QtCore -I."</p>
<p dir="auto">Project names are different but why qmake doesn't include<br />
"-I/opt/Qt5.1.0/5.1.0/gcc/include/QtWidgets"<br />
when started manualy from terminal?<br />
And how can I fix it?</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://forum.qt.io/topic/31117/problem-with-incpath</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 09:39:58 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/31117.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Aug 2013 14:17:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with INCPATH on Sat, 24 Aug 2013 19:15:50 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">You are missing</p>
<p dir="auto">@QT += widgets@</p>
<p dir="auto">in your pro file.</p>
<p dir="auto">You can compare the pro files generated by QtCreator and the one by qmake. QtCreator knows that you want to do a widget application so it adds a similar line with a check for Qt4/Qt5 compatibility. qmake doesn't know that so it's up to you to add it.</p>
]]></description><link>https://forum.qt.io/post/192412</link><guid isPermaLink="true">https://forum.qt.io/post/192412</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 24 Aug 2013 19:15:50 GMT</pubDate></item></channel></rss>