#include <QApplication>
#include <QPushButton>
using namespace std;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
}
hello,
i am david from germany and i try to tell you my problem in english ;)
I installed the QT software and wanted to compile Hello World application follows
Compiler does not find the includes -> "no such file or directory"
Where do i have to change which preferences? :-)
Hope somebody knows what i am writing about *g
-------------- Build: default in QtWorkbench ---------------
Compiling: src\qtwprogenerator.cpp
cc1plus.exe: sdk.h: No such file or directory
src\qtwprogenerator.cpp:9:21: manager.h: No such file or directory
src\qtwprogenerator.cpp:10:27: macrosmanager.h: No such file or directory
src\qtwprogenerator.cpp:11:28: messagemanager.h: No such file or directory
In file included from D:/Programme/QT/wxWidgets-2.6.3/include/wx/defs.h:21,
from D:/Programme/QT/wxWidgets-2.6.3/include/wx/object.h:24,
from D:/Programme/QT/wxWidgets-2.6.3/include/wx/tokenzr.h:19,
from src\qtwprogenerator.cpp:12:
D:/Programme/QT/wxWidgets-2.6.3/include/wx/platform.h:190:22: wx/setup.h: No such file or directory
In file included from D:/Programme/QT/wxWidgets-2.6.3/include/wx/platform.h:271,
from D:/Programme/QT/wxWidgets-2.6.3/include/wx/defs.h:21,
from D:/Programme/QT/wxWidgets-2.6.3/include/wx/object.h:24,
from D:/Programme/QT/wxWidgets-2.6.3/include/wx/tokenzr.h:19,
from src\qtwprogenerator.cpp:12:
D:/Programme/QT/wxWidgets-2.6.3/include/wx/chkconf.h:84:9: #error "wxUSE_DYNLIB_CLASS must be defined."
D:/Programme/QT/wxWidgets-2.6.3/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
D:/Programme/QT/wxWidgets-2.6.3/include/wx/chkconf.h:100:9: #error "wxUSE_FILESYSTEM must be defined."
...
...
...
- wxWidgets 2.6.2 (or 3) build as suggested in the wiki.
Compiler does not find the includes -> "no such file or directory"The template of QT project has some mistakes, this file in %CB%/share/codeblocks/templates/qt.cbp, looks like:
Where do i have to change which preferences? :-)
Hope somebody knows what i am writing about *g
......
<Compiler>
<Add directory="$QTDIR/include"/>
<Add directory="$QTDIR/include/Qt"/>
<Add directory="$QTDIR/include/Qt/ActiveQt"/>
<Add directory="$QTDIR/include/Qt/Qt3Support"/>
<Add directory="$QTDIR/include/Qt/QtAssistant"/>
<Add directory="$QTDIR/include/Qt/QtCore"/>
<Add directory="$QTDIR/include/Qt/QtDesigner"/>
<Add directory="$QTDIR/include/Qt/QtGui"/>
<Add directory="$QTDIR/include/Qt/QtMotif"/>
<Add directory="$QTDIR/include/Qt/QtNetwork"/>
<Add directory="$QTDIR/include/Qt/QtNsPlugin"/>
<Add directory="$QTDIR/include/Qt/QtOpenGL"/>
<Add directory="$QTDIR/include/Qt/QtSql"/>
<Add directory="$QTDIR/include/Qt/QtXml"/>
<Add option=""/>
</Compiler>
<Linker>
<Add library="libQt3Support4.a"/>
<Add library="libQtAssistantClient.a"/>
<Add library="libQtCore4.a"/>
<Add library="libQtDesigner4.a"/>
<Add library="libQtDesignerComponents4.a"/>
<Add library="libQtGui4.a"/>
<Add library="libqtmain.a"/>
<Add library="libQtNetwork4.a"/>
<Add library="libQtOpenGl4.a"/>
<Add library="libQtSql4.a"/>
<Add library="libQtXml4.a"/>
<Add directory="$QTDIR/lib"/>
<Add option=""/>
</Linker>
......
......
<Compiler>
<Add directory="$(QTDIR)/include"/>
<Add directory="$(QTDIR)/include/Qt"/>
<Add directory="$(QTDIR)/include/ActiveQt"/>
<Add directory="$(QTDIR)/include/Qt3Support"/>
<Add directory="$(QTDIR)/include/QtAssistant"/>
<Add directory="$(QTDIR)/include/QtCore"/>
<Add directory="$(QTDIR)/include/QtDesigner"/>
<Add directory="$(QTDIR)/include/QtGui"/>
<Add directory="$(QTDIR)/include/QtMotif"/>
<Add directory="$(QTDIR)/include/QtNetwork"/>
<Add directory="$(QTDIR)/include/QtNsPlugin"/>
<Add directory="$(QTDIR)/include/QtOpenGL"/>
<Add directory="$(QTDIR)/include/QtSql"/>
<Add directory="$(QTDIR)/include/QtXml"/>
<Add option=""/>
</Compiler>
<Linker>
<Add library="libQt3Support4.a"/>
<Add library="libQtAssistantClient.a"/>
<Add library="libQtCore4.a"/>
<Add library="libQtDesigner4.a"/>
<Add library="libQtDesignerComponents4.a"/>
<Add library="libQtGui4.a"/>
<Add library="libqtmain.a"/>
<Add library="libQtNetwork4.a"/>
<Add library="libQtOpenGl4.a"/>
<Add library="libQtSql4.a"/>
<Add library="libQtSvg4.a"/>
<Add library="libQtTest4.a"/>
<Add library="libQtUiTools.a"/>
<Add library="libQtXml4.a"/>
<Add directory="$(QTDIR)/lib"/>
<Add option=""/>
</Linker>
......
@yopWhy are you need yop's plugin?
Where do i have to copy your plugin folders/files?
and any other ideas, because of the missing files?
ok my fault, sorry...Don't worry about it, it also took me a few days to get comfortable with wxWidgets and Code::Blocks sdk, as with any other toolkit/sdk around. The main thing is to get it to work.
Compile Code::Blocks from sources, as according to the directions in the second link yop provided (do the Unicode build). The QtWorkbench plugin may be compiled in the last step (compiling addl./contrib plugins).Exactly:
Nope, no problems here. Let me sum up what you 'll need:@lfm: I guess he doesn't just need a hello world example, else why would he get in all this trouble ;)
- Code::Blocks latest sources
- wxWidgets 2.6.2 (or 3) build as suggested in the wiki.
- a zip utility in your path as suggested in the wiki.
Unzip the plugin sources in the contrib plugins path inside codeblocks sources. Open the codeblocks project, build. Open the qtworkbench project from the contrib plugins directory, build. Run update.bat. Run codeblocks.exe from the output dir. Voila.
It still does not work...here are my steps:I guess that you have not set the system enviroment variables ( QTDIR ), do it.
- codeblocks-1.0-rc1_mingw.exe downloaded from sourceforge
- ran the exe file
- copied the folders (src, debian, docs) and files of the cb source to codeblocks directory
- downloaded latest nightly build release for Windows from http://forums.codeblocks.org/index.php?topic=3214.0
- unpacked the .7z file and copied the files to the cb folder.
- copied wxmsw26u_gcc_cb.dll to cb folder
- compiled wxWidgets in Unicode mode
- compiled the codeblocks project (src/CodeBlocks.cbp)
- ran update.bat
- edited the file: %CB%/share/codeblocks/templates/qt.cbp like Ifm said (without this step it also does not work)
If i want to compile the simple hello world program of Qt the included Qt headers won't be found. (No such file or directory)
yop, now i have got the menue item Qtworkbench but there is no reaction, if i want to build a project for example.See the picture in my attachment some posts above. Press the QMake - Build entry. What happens?