Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
QtWorkbench plugin
yop:
--- Quote from: H0LL0 on July 05, 2007, 05:44:12 pm ---hi, i just wanted to say, that everything works fine, and your tutorials are working very good.
its just, that issue no. 7 is pissing me off :p
is there anything i can do? i mean, except copy pasting the line to console and insert the "" ?
--- End quote ---
H0LL0 you might be interested in http://code.google.com/p/qtworkbench/wiki/ImportingProjects ;)
AnTeevY:
Hello, I've got some problems with the plugin... (I've read alle those tuts: http://code.google.com/p/qtworkbench/wiki/PluginUsage)
1. What's the difference between choosing to create a release or a debug target when creating the project, I mean, does it matter, because later you can choose between both in the Qt Project options again?
2. In the Qt Project options, it's irrelevant whether I select "Release" or "Debug" or both, when I build, it just does the one I' chosen when creating the project. Debug mode also only works if I've created a debug target, but the docs say "Also note that although we created a "Release" target when we created the project we can set our target to be a "Release" or "Debug" target from the Qt project options dialog."?
3. In the Create Targets Dialog (project creation), if I type in another name than "Release" (in the Release field) or "Debug" (in the Debug field), I can't compile because there "is no rule to make target ***" (*** = the name of the target). Why is this?
4. Something about makefiles: why does it always create both release and debug ones?
Thanks ;)
yop:
--- Quote from: AnTeevY on July 17, 2007, 03:15:43 pm ---1. What's the difference between choosing to create a release or a debug target when creating the project, I mean, does it matter, because later you can choose between both in the Qt Project options again?
--- End quote ---
You get different compiler/linker flags generated from Code::Blocks and propogated to your Makefiles. For instance in "Release" targets you get -O2 in compiler options and -s in linker (optimize and strip respectively).
--- Quote from: AnTeevY on July 17, 2007, 03:15:43 pm ---2. In the Qt Project options, it's irrelevant whether I select "Release" or "Debug" or both, when I build, it just does the one I' chosen when creating the project. Debug mode also only works if I've created a debug target, but the docs say "Also note that although we created a "Release" target when we created the project we can set our target to be a "Release" or "Debug" target from the Qt project options dialog."?
--- End quote ---
This should not happen.
--- Quote from: AnTeevY on July 17, 2007, 03:15:43 pm ---3. In the Create Targets Dialog (project creation), if I type in another name than "Release" (in the Release field) or "Debug" (in the Debug field), I can't compile because there "is no rule to make target ***" (*** = the name of the target). Why is this?
--- End quote ---
This should not happen.
--- Quote from: AnTeevY on July 17, 2007, 03:15:43 pm ---4. Something about makefiles: why does it always create both release and debug ones?
--- End quote ---
This is the default behavior of qmake in windows. You get both files and depending on the entry in Qt project options the upper level Makefile decides which one to use. Anyway this is transparent and handled by qmake so there is nothing to worry about there.
I have a feeling that for 2. and 3. you have a setting wrong. If it is possible to attach a sample project that presents the problems above, it would help a lot. Anyway I am preparing 0.5.1 that fixes a few things that were reported (actually one that I found pretty major: the default operator in .pro files can be dynamic depending on the identifier, e.g. TEMPLATE now has "=" while others can have "+="). If there is a bug that causes 2. and / or 3. I would like to fix it before releasing it.
Since I am sure that many users will just mess up setting up a new project (because it is actually quite hard to do, I even mess it up sometimes) the next step I guess will be providing a QtWorkbench wizard for creating new projects and targets that will handle the setting up and you 'll just have to concentrate on getting your work done not configuring a stupid plugin :-)
AnTeevY:
Thanks for the quick reply. I'll try to upload a sample project this evening (in Germany GMT+1), which means in ~6 hours.
Ah, and another weird thing I forgot to mention: the first makefile created by the qmake shortcut in the menu is "makefile.targetname" (+ makefile.targetname.release and makefile.targetname.debug), but if
a) I try to compile and they are not found by the compiler (because normally it searches for "makefile" and not for "makefile.targetname" [this isn't mentioned in the setting-up-a-project-tutorial?]) or
b) I delete the makefiles
and I click on the shortcut again, qmake creates new ones, which look like makefile.targetname.targetname.release for example, and if I redo a) or b) it creates makefile.targetname.targetname.targetname.release and so on.
I hope this helps you :)
yop:
--- Quote from: AnTeevY on July 17, 2007, 04:30:26 pm ---...(because normally it searches for "makefile" and not for "makefile.targetname" [this isn't mentioned in the setting-up-a-project-tutorial?])...
--- End quote ---
This is indeed documented in http://code.google.com/p/qtworkbench/wiki/QtWorkbenchProjects , there (check the screenshot) we change the Makefile that make tries to find to <whatever the Makefile name is>.<target>
This is done in order to support the (honestly) only deviation I take from the way qmake expects to follow for .pro generation (for multiple targets I should have a SUBDIR entry etc. but then it wouldn't play nice with C::B, I 've down that path ;-) )
So actually what happens is simple, for two targets:
* target1.pro and target2.pro are genrated by QtWorkbench in the project top level folder
* QtWorkbench calls qmake that creates Makefile.target1 and Makefile.target2 in the project top level folder
* C::B calls make using Makefile.target1 and Makefile.target2 from the project top level folder and C::B build system is happy :-) (so we can use the debugger, or launch the executable or whatever)
I 'll check the bug you mention (it's a funny one you must admit :-) )
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version