<?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[building issues with wrong qmake version]]></title><description><![CDATA[<p dir="auto">Hello everyone<br />
This post is somehow in between installation and building. A few days ago I installed QT 5.9.1. I used QT Creator which just works perfectly. However I want to include QT in an existing project which is controlled by git and thus use QT creator only for UI placement. However I faced/ I am facing some issues here:<br />
[I seem to have installed a QT 4.x version a longer time ago which I did not uninstall]</p>
<p dir="auto">1st (solved myself): using qmake I was not able to compile for 5.9.1 but only 4.x . I followed the symlink from qmake in /usr/bin to qtchooser. There I deleted 4.conf and qt4.conf, keeping 5.conf and qt5.conf. This didn't work out so I manually created a default.conf file containing the qt5 bin and lib path. This worked out.</p>
<p dir="auto">2nd (solved dirty): Now qmake was the right version. However make told me that it could not find qdialog.h. Checking the makefile myself I discovered that for the include the entry for ".../QtWidgets/" was missing. I entered this manually which made it compile successfully. Is there a clean way ? Or is it just a bug from qmake ?</p>
<p dir="auto">3rd (not solved): After successful compilation I received dozens of "undefined reference to...". (I do not show as I did not find the "spoiler" function for posting. However I guess there is some option in the makefile missing or I have to copy some .so file into this folder. I was just not able to figure this out myself. Some examples of the unresolved references:</p>
<p dir="auto">main.cpp:(.text.startup+0x81): Nicht definierter Verweis auf <code>QApplication::~QApplication()' main.cpp:(.text.startup+0xd1): Nicht definierter Verweis auf </code>QDialog::~QDialog()'<br />
main.cpp:(.text.startup+0xd9): Nicht definierter Verweis auf <code>QApplication::~QApplication()' dialog.o: In Funktion </code>Dialog::createMenu()':<br />
dialog.cpp:(.text+0x30): Nicht definierter Verweis auf <code>QMenuBar::QMenuBar(QWidget*)' dialog.cpp:(.text+0x73): Nicht definierter Verweis auf </code>QMenu::QMenu(QString const&amp;, QWidget*)'</p>
<p dir="auto">Greetings and thanks in advance<br />
Moritz</p>
]]></description><link>https://forum.qt.io/topic/82346/building-issues-with-wrong-qmake-version</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 07:42:43 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/82346.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 13 Aug 2017 19:41:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to building issues with wrong qmake version on Tue, 15 Aug 2017 04:10:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/moritzp">@<bdi>moritzP</bdi></a> said in <a href="/post/410249">building issues with wrong qmake version</a>:</p>
<blockquote>
<p dir="auto">Maybe qmake does more than I expected it to do ?</p>
</blockquote>
<p dir="auto">No, it looks like on your system the Qt libraries are in a known location (like /usr/lib), or LD_LIBRARY_PATH is pointing to the location.</p>
]]></description><link>https://forum.qt.io/post/410341</link><guid isPermaLink="true">https://forum.qt.io/post/410341</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Tue, 15 Aug 2017 04:10:52 GMT</pubDate></item><item><title><![CDATA[Reply to building issues with wrong qmake version on Mon, 14 Aug 2017 13:12:25 GMT]]></title><description><![CDATA[<p dir="auto">doing a make clean and adding</p>
<pre><code>QT += core gui widgets
</code></pre>
<p dir="auto">did the trick. You saved my day, thank you !<br />
I did not have to do any specific linking. Just run qmake and ./dialog (executable) will show up the dialog window. Maybe qmake does more than I expected it to do ?</p>
<p dir="auto">Thanks everyone for helping me ! This is solved.</p>
]]></description><link>https://forum.qt.io/post/410249</link><guid isPermaLink="true">https://forum.qt.io/post/410249</guid><dc:creator><![CDATA[moritzP]]></dc:creator><pubDate>Mon, 14 Aug 2017 13:12:25 GMT</pubDate></item><item><title><![CDATA[Reply to building issues with wrong qmake version on Mon, 14 Aug 2017 07:22:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/moritzp">@<bdi>moritzP</bdi></a> Please add</p>
<pre><code>QT += core gui widgets
</code></pre>
<p dir="auto">to your pro file, then run qmake again and rebuild.<br />
Regarding number 3: if you start your app manually (not  from QtCreator) you first have to deploy it, so the system can find needed Qt libraries. See <a href="http://doc.qt.io/qt-5/linux-deployment.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/linux-deployment.html</a></p>
]]></description><link>https://forum.qt.io/post/410192</link><guid isPermaLink="true">https://forum.qt.io/post/410192</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 14 Aug 2017 07:22:47 GMT</pubDate></item><item><title><![CDATA[Reply to building issues with wrong qmake version on Sun, 13 Aug 2017 22:41:57 GMT]]></title><description><![CDATA[<p dir="auto">Thank you.<br />
Yes. Actually if I ONLY issue qmake a Makefile is generated with the following header:</p>
<pre><code># Makefile for building: dialog
# Generated by qmake (3.1) (Qt 5.9.1)
# Project:  dialog.pro
# Template: app
# Command: /home/moritz/Qt/5.9.1/gcc_64/bin/qmake -o Makefile dialog.pro
</code></pre>
<p dir="auto">And my <a href="http://dialog.pro" target="_blank" rel="noopener noreferrer nofollow ugc">dialog.pro</a>:</p>
<pre><code>SOURCES = main.cpp \
        dialog.cpp
HEADERS = dialog.h
TARGET = dialog
CONFIG += QT
</code></pre>
<p dir="auto">//edit<br />
so this seems fine but I write c++ code and thus I want it to compile with g++. But there is no g++ folder only that gcc. Do I have to issue anything to qmake to make this clear ?</p>
<p dir="auto">Greetings<br />
Moritz</p>
<p dir="auto">//edit2<br />
the "building" issues is incorrect because I did not build it but installed the .run file. so it's rather installation issues. with building I meant compilation. Any advice what to do ? Problem number 2 and 3 are still remaining</p>
]]></description><link>https://forum.qt.io/post/410172</link><guid isPermaLink="true">https://forum.qt.io/post/410172</guid><dc:creator><![CDATA[moritzP]]></dc:creator><pubDate>Sun, 13 Aug 2017 22:41:57 GMT</pubDate></item><item><title><![CDATA[Reply to building issues with wrong qmake version on Sun, 13 Aug 2017 21:13:33 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Any chance that you are calling just <code>qmake</code> on the command line ?</p>
<p dir="auto">If so that's the problem, you are calling your distribution installed qmake which is likely Qt 4 from what you wrote.</p>
<p dir="auto">Use the full path every time you are on the console so you ensure that you are using the correct Qt version.</p>
]]></description><link>https://forum.qt.io/post/410171</link><guid isPermaLink="true">https://forum.qt.io/post/410171</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sun, 13 Aug 2017 21:13:33 GMT</pubDate></item><item><title><![CDATA[Reply to building issues with wrong qmake version on Sun, 13 Aug 2017 20:46:27 GMT]]></title><description><![CDATA[<p dir="auto">Hey,</p>
<p dir="auto">Sorry I forgot to tell you my os. yes I use Xubuntu 16.04 (LTSE)<br />
and yes, I'm german.</p>
<p dir="auto">Greetings<br />
Moritz</p>
]]></description><link>https://forum.qt.io/post/410166</link><guid isPermaLink="true">https://forum.qt.io/post/410166</guid><dc:creator><![CDATA[moritzP]]></dc:creator><pubDate>Sun, 13 Aug 2017 20:46:27 GMT</pubDate></item><item><title><![CDATA[Reply to building issues with wrong qmake version on Sun, 13 Aug 2017 19:51:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/moritzp">@<bdi>moritzP</bdi></a> said in <a href="/post/410155">building issues with wrong qmake version</a>:</p>
<blockquote>
<p dir="auto">3rd (not solved): After successful compilation I received dozens of "undefined reference to...". (I do not show as I did not find the "spoiler" function for posting. However I guess there is some option in the makefile missing or I have to copy some .so file into this folder. I was just not able to figure this out myself. Some examples of the unresolved references:I</p>
</blockquote>
<p dir="auto">If  you have a makefile i suppose is not on Window system...<br />
I have seen gigantic differences from qt4 to qt5, very often it is enough to accept other view point from program something new from another corner (aus einem neuen blickwinkel ansehen) and not put any association on the previous version.</p>
<p dir="auto">This output error in german is this from Linux debian?</p>
]]></description><link>https://forum.qt.io/post/410156</link><guid isPermaLink="true">https://forum.qt.io/post/410156</guid><dc:creator><![CDATA[patrik08]]></dc:creator><pubDate>Sun, 13 Aug 2017 19:51:25 GMT</pubDate></item></channel></rss>