News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

QT installed but problems with compiler

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

Previous topic - Next topic

lfm

#15
Quote from: deetee on May 20, 2006, 08:34:12 PM
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
The template of QT project has some mistakes, this file in %CB%/share/codeblocks/templates/qt.cbp, looks like:
......
<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>
......


Please edit it to follows, then create new project from the qt template:
......
<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>
......

deetee

#16
thank you Ifm, but there are no changes after that.

@yop
I have a path like this now:

D:\Programme\CodeBlocks\src\plugins\contrib\qtworkbench

and it doesn't work.

But there is also something strange, i can't find (with search) files missed by compiler:
manager.h
macrosmanager.h
messagemanager.h
sdk.h
compilerfactory.h
settings.h
cbproject.h
compiler.h
cbplugin.h
sdk_events.h

these files i aren't in the codeblocks, QT or wxWidgets (sub)folders. Where do they have to be?

build log:


My cb version:



yop

And there are no messagemanager.h and macrosmanager.h in D:\Programme\CodeBlocks\src\sdk\ ?
Life would be so much easier if we could just look at the source code.

deetee

unfortunately not.

i will try a new installation with new downloaded files.

deetee

#19
so, here are my steps:

- codeblocks-1.0-rc1_mingw.exe downloaded from sourceforge
- ran the exe file
- downloaded latest nightly build release for Windows from http://forums.next.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

Note:
there is no src folder in CodeBlocks/ (also no src/sdk/ subfolder)
there aren't files like messagemanager.h or macrosmanager.h in all subfolders of codeblocks

@yop
Where do i have to copy your plugin folders/files?

and any other ideas, because of the missing files?



yop

This is third that I 'm telling you that you need the c::b sources, not just the binary night build. You can see how to download the source code in any of the following links:
http://www.codeblocks.org/source_code.shtml
http://wiki.codeblocks.org/index.php?title=Building_From_Source#MS_Windows
Life would be so much easier if we could just look at the source code.

deetee

ok my fault, sorry.

next steps i did:

- svn checkout
- copied the folders (src, debian, docs) and files i got from the checkout to codeblocks directory
- copied yop's plugin folder qtworkbench to D:\Programme\CodeBlocks\src\plugins\contrib\
- set the environment/global variables cb and wx
- tried to build the qtworkbench project and got an error:




yop, do you know what to do?

TDragon

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).
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

lfm

Quote from: deetee on May 28, 2006, 03:23:42 PM
@yop
Where do i have to copy your plugin folders/files?
and any other ideas, because of the missing files?
Why are you need yop's plugin?
I have not installed yop's plugin, but all seems to fine, my steps ( WinXP + QT4):
- install Qt, and set system enviroment variables
- download(and install) MinGW from http://www.mingw.org
- download latest nightly build release (not need source): http://download.berlios.de/codeblocks/CB_20060527_rev2511_win32.7z
- download wxWidget dll : http://download.berlios.de/codeblocks/wxmsw26u_gcc_cb.7z
- unpack above two .7z file and copied the files to the cb folder.
- edit the file: %CB%/share/codeblocks/templates/qt.cbp
Then create "hello world" Qt program from Qt template, build and run, OK!

yop

#24
Quote from: deetee on May 28, 2006, 03:55:31 PM
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.
Quote from: TDragon on May 28, 2006, 04:11:46 PM
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:
Quote from: yop on May 21, 2006, 05:09:51 PM
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.
@lfm: I guess he doesn't just need a hello world example, else why would he get in all this trouble ;)
Life would be so much easier if we could just look at the source code.

deetee

#25
TDragon you're right, thank you.
Ifm, i will try your way next time.

my steps:

- codeblocks-1.0-rc1_mingw.exe downloaded from sourceforge
- ran the exe file
- downloaded latest nightly build release for Windows from http://forums.next.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
- svn checkout
- copied the folders (src, debian, docs) and files i got from the checkout to codeblocks directory
- copied yop's plugin folder qtworkbench to D:\Programme\CodeBlocks\src\plugins\contrib\
- set the environment/global variables cb and wx

- built the codeblocks project (src/CodeBlocks.cbp)
- built yop's plugin qtworkbench.cbp
- ran update.bat

but i can't build the QT hello world example:


Which variables i forgot?

yop

You didn't build Code::Blocks from source but this might work:
Close Code::Blocks, in [CodeBlocks dir]\devel\share\ copy the CodeBlocks folder in [CodeBlocks dir]\share\ and run Code::Blocks again. You should see a menu item named QtWorkbench. Select QMake and Build from there.

The best choise though would be to actually follow the steps in the wiki to build codeblocks and the instructions from the plugin post to build the plugin.
Life would be so much easier if we could just look at the source code.

deetee

If i copy like you say by starting cb again i get an error that wxmsw26u_gcc_custom.dll was not found.


yop

You can copy that from your wxWidgets dir (it should be somewhere under the lib dir). But we are just making a mess. Why don't you just build Code::Blocks and the plugins as everyone here suggested in the first place?
Life would be so much easier if we could just look at the source code.

deetee

ok, i will do a new installation. It can't be so complicated.