Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Enhancements to the CB Build System
MortenMacFly:
Al-right, a long lists with ToDo's. ;D
BTW: I know QT but I don't like it much. It caused me serious headaches two times when I needed to port to a more recent version. Their API just changes too much. :-)
Anyway: I still have a QT4 installed which I could use for that purpose (or do I need a special version?).
Give me some time, I am currently not at a PC where I can try.
BTW: I also spotted some missing #includes in your patch that break compilation with non-PCH compiler (and therefore 64 bit builds).
However, I'll have this fixed before...
scarphin:
--- Quote from: MortenMacFly on April 13, 2015, 08:49:01 pm ---BTW: I also spotted some missing #includes in your patch that break compilation with non-PCH compiler (and therefore 64 bit builds).
--- End quote ---
Sorry for that, I have no idea how pch works so when I encountered code involving pch I just rolled the dice on where to put the includes. ;) Btw I'm currently testing this on a wx2.8 64-bit build, is pch defined by default in 'codeblocks.cbp' or is the problem related to wx3.0?
You can use any qt4.8 version (to be safe) but obviously it must be built with the compiler designated to the project. Unfortunately qt builds are big downloads, if yours doesn't work with the compiler, you can use the qt builds by mingw-builds:
http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/
Afaik recent ones also include the compiler used to build the library.
If you find the features worthy, I may again try to provide incremental patches if need be. Thanks for your time.
MortenMacFly:
OK... I know again why I hate QT... this is a never-ending story.
I think I've gotten it (not yet completely) working like this:
- Download the official compiler from here: http://www.qt.io/download-open-source
(http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-windows-x86-mingw491_opengl-5.4.1.exe)
- Install the tools including the compiler (it is unselected by default)
- Make a copy of the GCC compiler (name it e.g. "GNU GCC compiler for QT")
- Setup the toolchain master path to point to the root of the installed MinGW compiler (not the QT binaries)
- Follow the steps you've described (global var, extensions, project setup etc...)
- Select the virtual target "All"
- Hit "Compile"
The result:
- The "debug" build target compiles just fine (I think the first build target will always compiler fine)
- The "release" (2nd, 3rd...) target fails
To get the application running I needed to copy it into the QT "bin" directory, otherwise it was unable to find the windows platform plugin.. :-/
So - its not yet perfect. I've attached the project to this post so you can play with it.
I would clearly prefer if it works with qt5 instead of qt4 first, btw...
BTW: I preferred the commands for "ui" file types to be:
$(#qt.bin)\uic.exe $file -o $(project_dir)qt_ui\ui_$file_name.h
...and:
$(project_dir)qt_ui\ui_$file_name.h
...and respectively for "moc":
$(#qt.bin)\moc.exe $file -o $(project_dir)qt_moc\moc_$file_name.cpp
...and:
$(project_dir)qt_moc\moc_$file_name.cpp
...in case you wonder.
It should be more generic because usually you have one main QT development SDK which should be 5.
Also: For the global compiler vars it is enough to set the master path. That is because anything like $(#qt.include) will automatically be expanded to [PATH]\include (the GCV's field name) if it is not set.
scarphin:
Ok, thanks for trying, I'll try to find what's wrong with qt5. There is no reason it shouldn't work with qt5 though.
In my opinion qt is way harder to configure if one uses the qt installer that's why I suggested a ready-to-use build. ;)
MortenMacFly:
I think it's not an issue with the qt version but with the implementation. The object files for the second target don't go into the right folder, therefore the linker cannot find them.
Also, there was an issue if you load a project with a custom command that refers to a compiler probably not present on the target computer. make sure you always verify pointers! :-)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version