News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

QT installed but problems with compiler

Started by deetee, May 20, 2006, 08:34:12 PM

Previous topic - Next topic

deetee

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

    #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();
    }


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

Michael

Quote from: deetee on May 20, 2006, 08:34:12 PM
hello,

i am david from germany and i try to tell you my problem in english ;)

Hello David.

Your english is ok :).

Quote from: deetee on May 20, 2006, 08:34:12 PM
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

Concerning Qt, there are quite a few useful posts in the forum. Try to search and if you still have problems, then post. But do not forget the C::B revision, compiler you are using and OS.

Best wishes,
Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

deetee

#2
hi Michael,

well i found a lot of posts about my problem especially helpful was yop's plugin. I installed a nightly build release, downloaded wxWidgets from sourceforge and ran the qtworkbench project file of yop's plugin.
I set the global variables cb and wx on

cb = D:\Programme\CodeBlocks\src (also D:\Programme\CodeBlocks but both didn't work)
wx = D:\Programme\QT\wxWidgets-2.6.3

I tried to build the project and got the following build log:

Quote-------------- 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."
...
...
...

I think i need a step by step teaching list *g
Could anyone help me please?

EDIT
i need to say it's 2:00 a.m. in Germany now ;)

deetee

hmmm ok, i will tell you my steps i did:

- installed Qt 4.1.3
- ran "Qt build debug libraries"
- installed C::B nightly build of 20th march
- installed yop's plugin QTWorkbench with the paths above for cb and wx

and that's it.

I try to build the QTWorkbench project and following files are missing:

- manager.h
- macrosmanager.h
- messagemanager.h

all included in src/qtwprogenerator.cpp.

And there is something strange with the wxWidgets-2.6.3\include\msvc\wx\setup.h included in wxWidgets-2.6.3\include\wx\platform.h (190) but a commentary in setup.h says:

// Purpose:     wrapper around the real wx/setup.h for Visual C++

and i don't use Visual C++ and there is non setup.h in the include/wx/ directory...but a setup_inc.h and a setup_redirect.h.


Maybe someone can tell me his preferences he did do?




Defender

Well, I don't use Qt, but it seems, that your include directories aren't set up right.
Could you try this include configuration:
include dirs:
$(#WX.include)
$(#WX.lib)\gcc_dll\msw$(WX_SUFFIX)
$(#WX)\contrib\include

Where WX_SUFFIX = u for Unicode, d for Debug

Regards, Defender.

yop

Let me update from svn to see what's going on
Life would be so much easier if we could just look at the source code.

yop

Nope, no problems here. Let me sum up what you 'll need:
- 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.
Life would be so much easier if we could just look at the source code.

deetee


deetee

Quote- wxWidgets 2.6.2 (or 3) build as suggested in the wiki.

that's the point. I don't know how to build wxWidgets. I read something about makefiles different for each compiler in build/msw/, but how can i run a makefile with codeblocks?

It seems i am too stupid  :?

Ceniza


deetee

thanks a lot! It's compililng wxWidgets right now, i am so happy about that...

i will be right back if it's done.

deetee

No, it doesn't work yet, but wxWidgets were successfully compiled. I set the variables like these settings http://wiki.codeblocks.org/index.php?title=Global_compiler_variables but when i compile the qtworkbench project of yop's plugin i get the same error message like before.

Maybe, anyone can tell me his variables settings? Or any other ideas?


yop

#12
The cb global variable should point to the src directory of the codeblocks sources. My two global vars (to give you a hint) are:
Variable: cb Base Directory: C:\Workbench\codeblocks\src
Variable: wx Base Directory: C:\Devel\wxWidgets-2.6.3
Trust me you don't need anything else.

If you havent done this already you should unpack the archive you downloaded in the contrib plugins folder of the codeblocks sources. Again as a hint in my computer that is: C:\Workbench\codeblocks\src\plugins\contrib
Life would be so much easier if we could just look at the source code.

deetee

#13
thank you for reply, but it doesn't work. Ok, i will tell you my settings:









@yop
i downloaded a zip archive named qtworkbench-0.4.0.alpha and inside of this archive are 2 direcotries res and src and 3 files (qtworkbench, qtworkbench-linux, qtworkbench.layout)

There isn't a directory src in the codeblocks base directory, like your desription. Or did you mean the src directory of your plugin? How must the path be then?

yop

OK let's take it one by one:
* In envinronment vars you only need QTDIR and PATH (that is if the Qt installation hasn't arready set them up for you, which is generally the case).
* In the global variables editor you don't really need to set the INCLUDE and LIB variables for either wx or cb global variables
* You don't need to add anything in the global compiler settings
* You don't need the WX and CB Custom variables in compiler's global settings.
* Inside the zip file you mention there is a directory named qtworkbench and under that you can find the two directories you mention. So under the contrib plugins directory you should have the qtworkbench folder.
* Do you *actually* have the latest codeblocks sources? That means have you made an svn checkout from the project's repository at Berlios?
Note: I just downloaded the zip file, extracted it, updated to the latest c::b revision and built it without any problems.
Life would be so much easier if we could just look at the source code.