<?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[Weird issue during the project building[SOLVED]]]></title><description><![CDATA[<p dir="auto">Hello!<br />
I have a really strange issue with Qt Creator. During the project design I created three widgets: First, secondFrom and MainWindow.<br />
So, the problem appears only when compiler is trying to build the widget with the name "First" - compiler can't find any headers, such as QWidget, QVariant etc.<br />
But, if in the project is no the widget with the name "First", there is no issues during the building. My question is: What's wrong with Qt Creator?</p>
<p dir="auto">Here is the screenshot: <a href="http://www.freeimagehosting.net/5kjnv" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.freeimagehosting.net/5kjnv</a></p>
<p dir="auto">p.s. On the screenshot are only two widgets. But it doesn't matter at all.</p>
]]></description><link>https://forum.qt.io/topic/13561/weird-issue-during-the-project-building-solved</link><generator>RSS for Node</generator><lastBuildDate>Fri, 08 May 2026 09:38:57 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/13561.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Jan 2012 10:52:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 15:13:51 GMT]]></title><description><![CDATA[<p dir="auto">Thank you very much!<br />
But what about the code inside of .zip? Could you, please, comment it? I mean, mainwindow.cpp and other guys, excluding first.cpp and first.h.</p>
]]></description><link>https://forum.qt.io/post/127523</link><guid isPermaLink="true">https://forum.qt.io/post/127523</guid><dc:creator><![CDATA[dmitrij]]></dc:creator><pubDate>Mon, 30 Jan 2012 15:13:51 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 15:07:13 GMT]]></title><description><![CDATA[<p dir="auto">BTW<br />
To demonstrate that it's actually the first target in the Makefile, take your original project (using <a href="http://first.xxx" target="_blank" rel="noopener noreferrer nofollow ugc">first.xxx</a>), open the Makefile in a text editor of your choice, search for a line "first: all" and change that to "first-xxx: all" and call make. It will run without problems :)</p>
]]></description><link>https://forum.qt.io/post/127517</link><guid isPermaLink="true">https://forum.qt.io/post/127517</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Mon, 30 Jan 2012 15:07:13 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 15:03:51 GMT]]></title><description><![CDATA[<p dir="auto">Wow, you never gonna sleep without known anything new...</p>
]]></description><link>https://forum.qt.io/post/127516</link><guid isPermaLink="true">https://forum.qt.io/post/127516</guid><dc:creator><![CDATA[GentooXativa]]></dc:creator><pubDate>Mon, 30 Jan 2012 15:03:51 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 15:01:19 GMT]]></title><description><![CDATA[<p dir="auto">First the cure:<br />
Rename first.h, first.cpp and first.ui to something different, eg. myfirst.h, myfirst.cpp and myfirst.ui.</p>
<p dir="auto">Second the explanation:<br />
You (and I) ran into a very subtle trick of qmake's makefile generation. qmake always generates a target <em>"first"</em> which is nothing else than an alias to target "all". Additionally, the makefile contains some magic rules that describe how to compile a source file into some object file, probably even builtin rules. Unfortunately, caused by the <em>target</em> first, these rules apply to the <em>source file</em> first.cpp, eventually leading to that crippled compiler call.</p>
<p dir="auto">Unfortunately, there is no other solution than renaming your source files. So, the big rule is:</p>
<p dir="auto"><em>Never put any file named <em><a href="http://first.xxx" target="_blank" rel="noopener noreferrer nofollow ugc">first.xxx</a></em> into a qmake based project!</em></p>
]]></description><link>https://forum.qt.io/post/127515</link><guid isPermaLink="true">https://forum.qt.io/post/127515</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Mon, 30 Jan 2012 15:01:19 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 14:33:07 GMT]]></title><description><![CDATA[<p dir="auto">Yes, sure. Here the link: <a href="http://students.oamk.fi/~t9nidm00/MultiPages.zip" target="_blank" rel="noopener noreferrer nofollow ugc">http://students.oamk.fi/~t9nidm00/MultiPages.zip</a><br />
BTW, I'll appreciate any suggestions about the code inside. Yes, it's not a real project, only playing with Qt. But I would like to know someone's opinion about working without QStackedWidget =)</p>
]]></description><link>https://forum.qt.io/post/127508</link><guid isPermaLink="true">https://forum.qt.io/post/127508</guid><dc:creator><![CDATA[dmitrij]]></dc:creator><pubDate>Mon, 30 Jan 2012 14:33:07 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 13:50:36 GMT]]></title><description><![CDATA[<p dir="auto">Can you put that project in a ZIP somewhere to download? Please only the sources (.h, .cpp, .ui) and the project file (.pro), no generated files (<em>.o, moc_</em>.cpp, ui_*.h) and no executables.</p>
]]></description><link>https://forum.qt.io/post/127502</link><guid isPermaLink="true">https://forum.qt.io/post/127502</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Mon, 30 Jan 2012 13:50:36 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 13:45:17 GMT]]></title><description><![CDATA[<p dir="auto">[quote author="Volker" date="1327930863"]Erm... the last output you posted here (that one right before my first comment) does not contain any errors...[/quote]</p>
<p dir="auto">I meant the output with the errors. Every time, when I tried to add the widget with the name "First", I get an error while building the project. It's weird...</p>
<p dir="auto">But if the name will be "Firstttt" etc. it works fine. As before, the question is, why or what's wrong with the name "First"?</p>
]]></description><link>https://forum.qt.io/post/127497</link><guid isPermaLink="true">https://forum.qt.io/post/127497</guid><dc:creator><![CDATA[dmitrij]]></dc:creator><pubDate>Mon, 30 Jan 2012 13:45:17 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 13:41:03 GMT]]></title><description><![CDATA[<p dir="auto">Erm... the last output you posted here (that one right before my first comment) does not contain any errors...</p>
]]></description><link>https://forum.qt.io/post/127495</link><guid isPermaLink="true">https://forum.qt.io/post/127495</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Mon, 30 Jan 2012 13:41:03 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 13:37:38 GMT]]></title><description><![CDATA[<p dir="auto">Yep, I tried. Result is the same.</p>
]]></description><link>https://forum.qt.io/post/127492</link><guid isPermaLink="true">https://forum.qt.io/post/127492</guid><dc:creator><![CDATA[dmitrij]]></dc:creator><pubDate>Mon, 30 Jan 2012 13:37:38 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 13:29:55 GMT]]></title><description><![CDATA[<p dir="auto">Try to completely rebuild the project, please.<br />
There are menu and context menu entries you can call.</p>
]]></description><link>https://forum.qt.io/post/127490</link><guid isPermaLink="true">https://forum.qt.io/post/127490</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Mon, 30 Jan 2012 13:29:55 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 11:42:06 GMT]]></title><description><![CDATA[<p dir="auto">And in this one, I only removed the widget with the name "first" and replace it with the widget with the name "Form":<br />
@#-------------------------------------------------</p>
<h1></h1>
<h1>Project created by QtCreator 2012-01-30T12:42:07</h1>
<h1></h1>
<p dir="auto">#-------------------------------------------------<br />
CONFIG += qt<br />
QT       += core gui</p>
<p dir="auto">TARGET = MultiPages<br />
TEMPLATE = app</p>
<p dir="auto">SOURCES += main.cpp<br />
mainwindow.cpp <br />
firstform.cpp <br />
form.cpp</p>
<p dir="auto">HEADERS  += mainwindow.h <br />
firstform.h <br />
form.h</p>
<p dir="auto">FORMS    += mainwindow.ui <br />
firstform.ui <br />
form.ui<br />
@</p>
<p dir="auto">Pretty the same project, but the name is different.<br />
That one is compiled and can be run.</p>
<p dir="auto">Here is the compiler output:<br />
@13:38:18: Running build steps for project MultiPages...<br />
13:38:18: Configuration unchanged, skipping qmake step.<br />
13:38:18: Starting: "E:\QtSDK\mingw\bin\mingw32-make.exe"<br />
e:\qtsdk\desktop\qt\4.7.4\mingw\bin\qmake.exe -spec ....\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++ -o Makefile <a href="http://MultiPages.pro" target="_blank" rel="noopener noreferrer nofollow ugc">MultiPages.pro</a><br />
E:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Debug<br />
mingw32-make.exe[1]: Entering directory <code>E:/QT_playing/MultiPages' e:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\uic.exe form.ui -o ui_form.h g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\form.o form.cpp E:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -D__GNUC__ -DWIN32 form.h -o debug\moc_form.cpp g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\moc_form.o debug\moc_form.cpp g++ -mthreads -Wl,-subsystem,windows -o debug\MultiPages.exe debug/main.o debug/mainwindow.o debug/firstform.o debug/form.o debug/moc_mainwindow.o debug/moc_firstform.o debug/moc_form.o  -L"e:\QtSDK\Desktop\Qt\4.7.4\mingw\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4 -LC:\OpenSSL-Win32_full\lib  mingw32-make.exe[1]: Leaving directory </code>E:/QT_playing/MultiPages'<br />
13:38:22: The process "E:\QtSDK\mingw\bin\mingw32-make.exe" exited normally.@</p>
]]></description><link>https://forum.qt.io/post/127474</link><guid isPermaLink="true">https://forum.qt.io/post/127474</guid><dc:creator><![CDATA[dmitrij]]></dc:creator><pubDate>Mon, 30 Jan 2012 11:42:06 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 11:33:39 GMT]]></title><description><![CDATA[<p dir="auto">According to the link which you posted, core and gui are included by default. Please, have a look at my .pro file below:<br />
@#-------------------------------------------------</p>
<h1></h1>
<h1>Project created by QtCreator 2012-01-30T12:42:07</h1>
<h1></h1>
<p dir="auto">#-------------------------------------------------<br />
CONFIG += qt<br />
QT       += core gui</p>
<p dir="auto">TARGET = MultiPages<br />
TEMPLATE = app</p>
<p dir="auto">SOURCES += main.cpp<br />
mainwindow.cpp <br />
firstform.cpp <br />
first.cpp</p>
<p dir="auto">HEADERS  += mainwindow.h <br />
firstform.h <br />
first.h</p>
<p dir="auto">FORMS    += mainwindow.ui <br />
firstform.ui <br />
first.ui<br />
@</p>
<p dir="auto">Here is the compiler output:<br />
@13:45:10: Running build steps for project MultiPages...<br />
13:45:10: Configuration unchanged, skipping qmake step.<br />
13:45:10: Starting: "E:\QtSDK\mingw\bin\mingw32-make.exe"<br />
e:\qtsdk\desktop\qt\4.7.4\mingw\bin\qmake.exe -spec ....\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++ -o Makefile <a href="http://MultiPages.pro" target="_blank" rel="noopener noreferrer nofollow ugc">MultiPages.pro</a><br />
E:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Debug<br />
mingw32-make.exe[1]: Entering directory <code>E:/QT_playing/MultiPages' e:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\uic.exe first.ui -o ui_first.h g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\first.o first.cpp E:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -D__GNUC__ -DWIN32 first.h -o debug\moc_first.cpp g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtCore" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtGui" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\include\ActiveQt" -I"debug" -I"." -I"..\..\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++" -o debug\moc_first.o debug\moc_first.cpp g++ -mthreads -Wl,-subsystem,windows -o debug\MultiPages.exe debug/main.o debug/mainwindow.o debug/firstform.o debug/first.o debug/moc_mainwindow.o debug/moc_firstform.o debug/moc_first.o  -L"e:\QtSDK\Desktop\Qt\4.7.4\mingw\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4 -LC:\OpenSSL-Win32_full\lib  g++ -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN    first.cpp all   -o first mingw32-make.exe[1]: Leaving directory </code>E:/QT_playing/MultiPages'<br />
In file included from first.cpp:1:<br />
first.h:4:19: error: QWidget: No such file or directory<br />
In file included from first.cpp:2:<br />
ui_first.h:13:27: error: QtCore/QVariant: No such file or directory<br />
ui_first.h:14:25: error: QtGui/QAction: No such file or directory<br />
ui_first.h:15:30: error: QtGui/QApplication: No such file or directory<br />
ui_first.h:16:30: error: QtGui/QButtonGroup: No such file or directory<br />
ui_first.h:17:29: error: QtGui/QHeaderView: No such file or directory<br />
ui_first.h:18:25: error: QtGui/QWidget: No such file or directory<br />
In file included from first.cpp:1:<br />
first.h:11: error: expected class-name before '{' token<br />
first.h:12: error: ISO C++ forbids declaration of 'Q_OBJECT' with no type<br />
first.h:14: error: expected ';' before 'public'<br />
In file included from first.cpp:2:<br />
ui_first.h:22: error: expected constructor, destructor, or type conversion before 'class'<br />
g++: all: No such file or directory<br />
mingw32-make.exe[1]: *** [first] Error 1<br />
mingw32-make.exe: *** [debug] Error 2<br />
13:45:14: The process "E:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.<br />
Error while building project MultiPages (target: Desktop)<br />
When executing build step 'Make'@</p>
]]></description><link>https://forum.qt.io/post/127470</link><guid isPermaLink="true">https://forum.qt.io/post/127470</guid><dc:creator><![CDATA[dmitrij]]></dc:creator><pubDate>Mon, 30 Jan 2012 11:33:39 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 11:27:11 GMT]]></title><description><![CDATA[<p dir="auto">Yes, but you should add the proper config to them, is a generical one.</p>
<p dir="auto">"Check this documentation":<a href="http://developer.qt.nokia.com/doc/qt-4.8/qmake-project-files.html" target="_blank" rel="noopener noreferrer nofollow ugc">http://developer.qt.nokia.com/doc/qt-4.8/qmake-project-files.html</a></p>
]]></description><link>https://forum.qt.io/post/127469</link><guid isPermaLink="true">https://forum.qt.io/post/127469</guid><dc:creator><![CDATA[GentooXativa]]></dc:creator><pubDate>Mon, 30 Jan 2012 11:27:11 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 11:24:59 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for your answer.</p>
<p dir="auto">Yes, I did that. But still, it doesn't work. And, as I understand right, *.pro file is generated automatically during the project creation. Am I right?</p>
]]></description><link>https://forum.qt.io/post/127467</link><guid isPermaLink="true">https://forum.qt.io/post/127467</guid><dc:creator><![CDATA[dmitrij]]></dc:creator><pubDate>Mon, 30 Jan 2012 11:24:59 GMT</pubDate></item><item><title><![CDATA[Reply to Weird issue during the project building[SOLVED] on Mon, 30 Jan 2012 11:21:45 GMT]]></title><description><![CDATA[<p dir="auto">You added the proper modules to your project files?</p>
<p dir="auto">@<br />
CONFIG += core <br />
gui <br />
etc, etc...<br />
@</p>
]]></description><link>https://forum.qt.io/post/127466</link><guid isPermaLink="true">https://forum.qt.io/post/127466</guid><dc:creator><![CDATA[GentooXativa]]></dc:creator><pubDate>Mon, 30 Jan 2012 11:21:45 GMT</pubDate></item></channel></rss>