Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: yop on February 04, 2006, 11:53:35 pm

Title: QtWorkbench plugin
Post by: yop on February 04, 2006, 11:53:35 pm
What is it?
A plugin that adds support for Qt to the Code::Blocks IDE
How?
Using qmake, Trolltech's makefile generator, included in every Qt installation. The plugin generates input files (.pro files) for qmake and then runs it to generate a makefile. Using the internal Code::Blocks support for Makefiles you can build your project and have all the features that C::B provides available.

More information in: http://code.google.com/p/qtworkbench/
Get the sources using svn (be carefull of wrapping):
svn checkout http://qtworkbench.googlecode.com/svn/trunk/ [C::B sources dir]/src/plugins/contrib/qtworkbench
Binaries: http://code.google.com/p/qtworkbench/downloads/list
Title: Re: QtWorkbench plugin
Post by: mandrav on February 05, 2006, 12:08:48 am
Nice job :)

Quote
And the best way would be to trigger somehow a makefile build. The only way I can see that being possible is to get the makefile build process out of the compiler plugin and into the core.

If you automatically set the project to use a custom makefile, then the following is sufficient:

Code: C++
  1. // find compiler plugin
  2. PluginsArray arr = Manager::Get()->GetPluginManager()->GetCompilerOffers();
  3. if (arr.GetCount() == 0)
  4.     return;
  5.  
  6. cbCompilerPlugin* compiler = static_cast<cbCompilerPlugin*>(arr[0]);
  7. if (compiler)
  8. {
  9.     // we have our compiler!
  10.     // start building
  11.     compiler->Build(targetName); // use <target_name> or leave <empty> for project build
  12.  
  13.     // wait for compiler to finish
  14.     while (compiler->IsRunning())
  15.     {
  16.         // if you want to abort the build, ucomment the following:
  17.         //compiler->KillProcess();
  18.  
  19.         wxMilliSleep(10);
  20.         Manager::Yield();
  21.     }
  22.     int exitCode = compiler->GetExitCode();
  23.  
  24.     // ta-da!
  25. }
  26.  

HTH.
Title: Re: QtWorkbench plugin
Post by: yop on February 05, 2006, 12:21:19 am
Well I've also created my plugin as a compiler plugin, are we sure that the compilergcc plugin will be in arr[0]? Now that I think about it my plugin doesn't have to be a compiler plugin at all... Let me see what I can figure out. And yes you 've helped a lot
Title: Re: QtWorkbench plugin
Post by: mandrav on February 05, 2006, 12:23:29 am
Well I've also created my plugin as a compiler plugin, are we sure that the compilergcc plugin will be in arr[0]? Now that I think about it my plugin doesn't have to be a compiler plugin at all... Let me see what I can figure out. And yes you 've helped a lot

I see you get the point ;)
Really, there is no reason for more than one compiler plugin loaded at the same time.
Title: Re: QtWorkbench plugin
Post by: yop on February 05, 2006, 01:45:10 am
And ta da it is  :D
Those 10 something lines of code made all the difference. I'll strip my code from all these obsolete stuff now (message log, calls to make, ...), that is a relief...
Title: Re: QtWorkbench plugin
Post by: yop on February 05, 2006, 05:11:22 pm
Houston, We Have a Problem...
Ok before I get the compiler to build I set it to using makefiles and when it finishes I return it to the previous state whatever that was. But this change to the build method produces the dialog "Project modified blah blah" which I would like to avoid.
Secondly I removed my log as it wasn't needed anymore, but I get the messages in the build log flushed when the build process finishes. I had the same behaviour with my log and I had to add the idle wake up timer. Do I also have to implement one although I don't have a log anymore? Doesn't this Yield thing "force" the pending events to be processed (so the buffered build log output should be flushed to the log by the compiler plugin)?
Title: Re: QtWorkbench plugin
Post by: mandrav on February 05, 2006, 05:27:05 pm
Quote
Ok before I get the compiler to build I set it to using makefiles and when it finishes I return it to the previous state whatever that was. But this change to the build method produces the dialog "Project modified blah blah" which I would like to avoid.

Code: C++
  1. // keep the old state
  2. bool wasModified = project->GetModified();
  3.  
  4. // change settings and build...
  5.  
  6. // revert to old state
  7. // ...
  8. project->SetModified(wasModified);
  9.  

Quote
Secondly I removed my log as it wasn't needed anymore, but I get the messages in the build log flushed when the build process finishes. I had the same behaviour with my log and I had to add the idle wake up timer. Do I also have to implement one although I don't have a log anymore? Doesn't this Yield thing "force" the pending events to be processed (so the buffered build log output should be flushed to the log by the compiler plugin)?

I haven't seen this, but try adding Manager::ProcessPendingEvents() after Manager::Yield() (or replace it).
Title: Re: QtWorkbench plugin
Post by: yop on February 05, 2006, 06:13:46 pm
I haven't seen this, but try adding Manager::ProcessPendingEvents() after Manager::Yield() (or replace it).
Replacing it made the whole app non responsive. If I totally comment out the folowing it works like a charm.
Code: C++
  1.         while (compiler->IsRunning())
  2.         {
  3.             // if you want to abort the build, ucomment the following:
  4.             //compiler->KillProcess();
  5.             wxMilliSleep(10);
  6.             //Manager::Yield();
  7.             Manager::ProcessPendingEvents();
  8.         }
  9.  
Maybe I should leave it like that (without the while loop) and check compiler->IsRunning(); when the user requests another build, or call compiler->KillProcess(); to stop it and start over.
Title: Re: QtWorkbench plugin
Post by: yop on February 13, 2006, 12:24:50 am
I've updated quite a few things, with the most important ones being linux support, Qt 3 support and multiple compilers support (at least gcc and icc were recognized beautifully) though you will have to delete any old Makefiles created for another compiler. I wasn't really planning on giving an update this early but that compiler ID instead of index change rushed things a bit so here you are (I didn't want any "I can't compile" remarks ;)). To build this one (namely 0.3) you 'll need at least revision 1967 of codeblocks. You'll also find a project file for linux, I had some problems with backticking wx-config --cflags. If anyone experiences this just give wx-config --cflags to a console and add anything that it outputs to the compiler options and it will build.
I 'll focus on workspace compilation and per target compilation to see what can be done there (it sohuld be easy as I've seen) and continue with the rest of the gui stuff, so it should be a while before I update again. You can get this latest release from the attachment in the first post. Any kind of feedback is welcome,
Yorgos
Title: Re: QtWorkbench plugin
Post by: yop on February 15, 2006, 08:26:18 pm
I 've updated to build under the current plugins framework (registering the plugin name). So you 'll need revision 1995 and up to build this one
Title: Re: QtWorkbench plugin
Post by: krisha on February 23, 2006, 01:57:37 am
the first positive about it: i had to download a rev > 1995 (2061) and throw away the rc2 :-)

but now i encounter a problem. I loaded the Win QTWorkbench and it asks me for a global variable wx and cb. What directories to put there ? For cb imho Code::Blocks main directory, but has that QT build process anything todo with wx ( i assume it stands for wxWidgets) ?

edit:

solved some parts:
- cb is the source of codeblocks
- wx is is simply the wxWidgets (for win we have to rename the setup_redirect.h to setup.h)

but now:
ld.exe: cannot find -lcodeblocks
same for wxmsw26u

i thought i use the dll's of that both, but that didn't work. How to get the right lib and where to put it ? Do I have to compile full codeblocks and wxWidgets again ?

if it's not so time consuming, maybe you can put a ready-for-use compiled Qt-Plugin DLL for download here ? I think you have all needed tools/libs to compile by just one click :-) thx.

Title: Re: QtWorkbench plugin
Post by: yop on February 24, 2006, 01:36:49 am
i thought i use the dll's of that both, but that didn't work. How to get the right lib and where to put it ? Do I have to compile full codeblocks and wxWidgets again ?
You need codeblocks lib, so yes you'll have to build codeblocks (I don't know what is in the night builds). For the wxWidgets lib you just have to point to where the specific lib is using the global variables (the "lib" path under the "wx" global variable should point to the folder where the wxWidgets lib is). If you find the correct setup it'll be easy to build it don't worry. As for the precompiled dll I don't find it such a good idea as it might become obsolete very quickly. When a new release of Code::Blocks is out I will provide something like that. Another issue is that for now I don't have any repository to put the dll so it would "waste" forum space.
Title: Re: QtWorkbench plugin
Post by: iw2nhl on March 01, 2006, 02:36:31 am
Hi, I'm here because I'm looking for an IDE for Qt/C++ development.
Using qmake I noticed that you can use it to generate the project file.
If there are troubles generating .pro files, while not use qmake to generate the project?
Here are the simple steps:
1) You have .cpp, .h and .ui files
2) You call "qmake -project [options] <files>" (<files> are your .cpp, .h and .ui files)
3) You call "qmake -makefile [options] project.pro" (or even only "qmake")
4) You can compile with "make" (or "mingw32-make")

Please, tell me if you need help for coding the plugin.
Alessandro
Title: Re: QtWorkbench plugin
Post by: yop on March 03, 2006, 10:47:33 am
Thanks Alessandro for your suggestions. Invoking qmake in the way you propose has limited control on your project options. In general letting qmake generate a .pro file is usefull only for small, single target projects. Sorry for my short and delayed answer but I'm away on a bussiness trip.
Yorgos
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on April 07, 2006, 08:50:20 am
Requested in another thread (http://forums.codeblocks.org/index.php?topic=2761.new) yop asked me to publish the changes I've done (well, project file changes only) here due to some compiling problems others might have.
...so I'm doing this hereby.
With regards, Morten.

Edit: The sources have been removed - meanwhile yop has released a most-up-to-date version that should be used in the first place.
Title: Re: QtWorkbench plugin
Post by: yop on April 07, 2006, 09:49:37 am
Thanks Morten.
Wow, the plugin has quite a few downloads, that's nice. I 'm migrating my work to a new hd and changing my linux distro so expect updates when I 'm done ;)
@ The devs : Though I don't know the current status in the svn, is there a way to take a little peak to the xml powered compiler framework?
Title: Re: QtWorkbench plugin
Post by: briahn06 on April 09, 2006, 09:13:52 am
I tried to build the qtworkbench project you disclosed, but it popped up with two undefined global variables: cb and wx.  I tried looking for settings.h, cbproject.h, compiler.h, etc. but couldn't find them.  I'm using an nightly build.  Could that be the problem?  and do I need to install wx to get this to work?
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on April 09, 2006, 11:06:24 am
[...] and do I need to install wx to get this to work?
You'll need the wxWidgets SDK and the CodeBlocks SDK. So basically you'll need to compile the wxWidgets library and the Code::Blocks SDK before you can compile a(ny) Code::Blocks PlugIn. With RC2 there was also a C::B SDK provided, but this is outdated and will not work.
Further information on how to do this in detail can be obtained from the WiKi.
With regards, Morten.
Title: Re: QtWorkbench plugin
Post by: yop on April 09, 2006, 12:11:43 pm
Morten, did you manage to build it (cause I 'll go crazy)? I don't have a fully functional pc at the moment so I can't be of much help right now.
Furthermore, is there *anyone* who has managed to use this plugin succesfully or should I just withdraw it and keep it for personal use? (believe it or not I use it heavily for development with Qt and I do a lot of it (it's my job to)).
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on April 09, 2006, 02:41:13 pm
Morten, did you manage to build it [...]
Yes, I build it constantly with every new C::B revision. I use exactly the files as provided in the archive from my other post and it works (integrates into C::B and other things).
Did you put the files as they are just into the plugins/contrib folder and tried to compile? I couldn't think of any reason why this should not work?!
With regards, Morten.
Title: Re: QtWorkbench plugin
Post by: lgarrido on April 09, 2006, 06:40:35 pm
I have tried to get this plugin running in Fedora Core 4. The steps I followed were:

- Install latest rpm (CB_20060407_rev2321_fc4.rpm) It fails with the following error:

06:03:18 PM: XRC resource 'pnlCB' (class 'wxPanel') not found!
06:03:18 PM: Cannot find container for unknown control 'txtSearch'.

- Then I installed codeblocks-1.0_0.svn.2212-0.fc4.i386.rpm Seems to work OK.

- Downloaded and unzipped QtWorkbench-0.3.1alpha.zip to ~/devel/testCodeBlocks

- Checked out matching SVN to ~/devel/testCodeBlocks/cb:

svn checkout --revision 2212 svn://svn.berlios.de/codeblocks/trunk cb

When I load the QtWB project it asks me to fill the value of cb. According to

http://wiki.codeblocks.org/index.php?title=Recommended_global_variables

I set cb to ~/devel/testCodeBlocks/cb/src

Now I hit the build button and get a bunch of errors. This gets solved by adding

/usr/include/wx-2.6
~/devel/testCodeBlocks/cb/src

to the " Project | Build options | Directories | Compiler " tab.

I get some

cc1plus: note: obsolete option -I- used, please use -iquote instead

messages, but it seems to build correctly. As root I install it

cp -r devel/testCodeBlocks/QtWorkbench/out/share /usr/

Then I restart CB and I get the following error

05:49:34 PM: XML parsing error: 'not well-formed (invalid token)' at line 23
05:49:34 PM: Cannot load resources from file '/usr/share/codeblocks/QtWorkbench.
zip#zip:qtworkbench_menu.xrc'.
05:49:34 PM: XML parsing error: 'not well-formed (invalid token)' at line 23
05:49:34 PM: Cannot load resources from file '/usr/share/codeblocks/QtWorkbench.
zip#zip:qtworkbench_menu.xrc'.
05:49:34 PM: XML parsing error: 'not well-formed (invalid token)' at line 23
05:49:34 PM: Cannot load resources from file '/usr/share/codeblocks/QtWorkbench.
zip#zip:qtworkbench_menu.xrc'.
05:49:34 PM: XML parsing error: 'not well-formed (invalid token)' at line 23
05:49:34 PM: Cannot load resources from file '/usr/share/codeblocks/QtWorkbench.
zip#zip:qtworkbench_menu.xrc'.
05:49:35 PM: XML parsing error: 'not well-formed (invalid token)' at line 23
05:49:35 PM: Cannot load resources from file '/usr/share/codeblocks/QtWorkbench.
zip#zip:qtworkbench_menu.xrc'.
05:49:35 PM: XML parsing error: 'not well-formed (invalid token)' at line 23
05:49:35 PM: Cannot load resources from file '/usr/share/codeblocks/QtWorkbench.
zip#zip:qtworkbench_menu.xrc'.
05:49:35 PM: XRC resource 'qtworkbench_menu' (class 'wxMenu') not found!
05:49:35 PM: XML parsing error: 'not well-formed (invalid token)' at line 23
05:49:35 PM: Cannot load resources from file '/usr/share/codeblocks/QtWorkbench.
zip#zip:qtworkbench_menu.xrc'.
05:49:35 PM: XML parsing error: 'not well-formed (invalid token)' at line 23
05:49:35 PM: Cannot load resources from file '/usr/share/codeblocks/QtWorkbench.
zip#zip:qtworkbench_menu.xrc'.
05:49:35 PM: XML parsing error: 'not well-formed (invalid token)' at line 23
05:49:35 PM: Cannot load resources from file '/usr/share/codeblocks/QtWorkbench.
zip#zip:qtworkbench_menu.xrc'.

I passed the xrc files through dos2unix, rebuilt and reinstalled with the same results.

Thoughts, anyone?

Cheers,

Luis
Title: Re: QtWorkbench plugin
Post by: briahn06 on April 09, 2006, 08:00:06 pm
I got a much simpler error, I hope.

C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw26u
collect2: ld returned 1 exit status

The rest of the plugin compiled successfully except for this one error.  Any ideas?
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on April 09, 2006, 08:27:01 pm
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw26u
A quick search through the forum for "cannot find -lwxmsw26u" would have revealed the reason multiple times: You either have not the wxWidgets SDK installed or the directories for the linker are not setup correctly.
With regards, Morten.
Title: Re: QtWorkbench plugin
Post by: briahn06 on April 10, 2006, 01:53:58 am
Sorry... I'm usually diligent with the search, but I figured this was a QTWorkBench ony problem... guess not, thanks for the info though.

I HAVE SUCCESSFULLY gotten it to build and at least show up/work as a plugin in my cb.  I have yet to see if the functions actually work though, but I am nonetheless excited.
Title: Re: QtWorkbench plugin
Post by: yop on April 10, 2006, 10:01:20 am
@ lgarrido: Did you open up the qtworkbench-linux.cbp or the qtworkbench.cbp? AFAIR the later has these problems on linux that's why I seperated them.
@ briahn06: Hope you find it useful ;)
@morten: Thanks for the support :) My pc at home is emerging kde so I don't really have a pc ;)
Title: Re: QtWorkbench plugin
Post by: lgarrido on April 10, 2006, 10:04:13 am
yop: I opened qtworkbench-linux.cbp
Title: Re: QtWorkbench plugin
Post by: yop on April 10, 2006, 11:15:54 am
cp -r devel/testCodeBlocks/QtWorkbench/out/share /usr/
This is where the rest of the codeblocks plugins' shared files are installed?
Title: Re: QtWorkbench plugin
Post by: lgarrido on April 10, 2006, 11:37:23 am
That's what I think. See directory listing below. CB recognizes the plugin and tries to load it, and then issues the error I posted. The QtWB top menu item appears, but the attached submenu is empty.


# ls /usr/share/codeblocks/
astyle.zip           defaultmimehandler.zip  plugins            templates
class_wizard.zip     help_plugin.zip         plugin_wizard.zip  tips.txt
code_completion.zip  icons                   profiler.zip       todo.zip
codestat.zip         images                  QtWorkbench.zip    wxsmith.zip
compiler_gcc.zip     lexers                  resources.zip
debugger_gdb.zip     manager_resources.zip   start_here.zip

# ls /usr/share/codeblocks/plugins/
libastyle.la          libdebuggergdb.so         libpluginwizard.la
libastyle.so          libdefaultmimehandler.la  libpluginwizard.so
libclasswizard.la     libdefaultmimehandler.so  libprofiler.la
libclasswizard.so     libdragscroll.la          libprofiler.so
libcodecompletion.la  libdragscroll.so          libtodo.la
libcodecompletion.so  libexporter.la            libtodo.so
libcodestat.la        libexporter.so            libwxsmith.la
libcodestat.so        libhelp_plugin.la         libwxsmith.so
libcompiler.la        libhelp_plugin.so         qtworkbench.so
libcompiler.so        libkeybinder.la
libdebuggergdb.la     libkeybinder.so

Title: Re: QtWorkbench plugin
Post by: squizzz on April 10, 2006, 12:08:25 pm
Does changing file name from QtWorkbench.zip to qtworkbench.zip help?
Title: Re: QtWorkbench plugin
Post by: lgarrido on April 10, 2006, 12:14:28 pm
Hmm, now the error is different:

XRC resource 'qtworkbench_menu' (class 'wxMenu') not found!

This is the same error as if I just delete the resource file. So I guess the right name is QtW... and the problem is not that the file is not found, but that there is some problem when parsing its content.
Title: Re: QtWorkbench plugin
Post by: lgarrido on April 10, 2006, 12:38:41 pm
GOT IT!!! Turns out that the file qtworkbench_menu.xrc distributed contains a NUL (0x00) character near the end (how did _that_ ever got there?) and this drives nuts the XML parser, at least in Linux.

Once removed this character and rebuilt/reinstalled the zip file the plugin is loaded as expected. Now time to play with it!

Cheers,

Luis
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on April 10, 2006, 01:18:10 pm
Turns out that the file qtworkbench_menu.xrc distributed contains a NUL (0x00) character near the end [...]
Now that you say this: Yes! That character I had to remove, too. Anyway: Within the archive I've uploaded in this forum  thread this character was already removed. Which version did you use for compiling? The same question I'd like to ask to yop...?!
With regards, Morten.
Title: Re: QtWorkbench plugin
Post by: lgarrido on April 10, 2006, 01:29:05 pm
Quote
Which version did you use for compiling?

I took it from the first posting of this thread.

Hmm, how do I add non-Qt libraries? Out of CB I include them in the .pro file, adding lines like

INCLUDEPATH += . ../include
unix:LIBS += -llrdf

As I see in your sources, you just fire up the qmake project generator, which is ok for pure Qt but doesn't cut it for more complex projects. You could take information like this from the CB project and add it to the qmake command line so it will include it in the project file like this:

qmake -makefile -unix -o Makefile "CONFIG+=test" test.pro
Title: Re: QtWorkbench plugin
Post by: tiwag on April 10, 2006, 02:21:53 pm
can anyone who is using successfully this plugin (Morten?) upload a demo CodeBlocks-project please,
where the build process works ?

what i've done so far:
* built the plugin without problems (from Mortens upload QtWorkbench.zip),
* made a new CB project (from the QT template) qt1
* Run Menu QtWorkbench->Qmake-Build,
   then a qt1.pro file exists in the project directory, but nothing else happens,
   when i run qmake manually from the commandline then the qt1.exe builds fine
* Run Menu QtWorkbench->Qmake-ReBuild, same as above
* Run Menu QtWorkbench->Qmake-Clean, same as above, also the qt1.pro file does still exist, which i would expect to be deleted.

from what i've read in the first posting of this thread from yop , i would expect, that when running QtWorkbench->Qmake-Build
after building the *.pro file qmake would be invoked to build the makefile and afterwards running make ?? am i wrong ?

how should i setup my project that it gets built ?

[edit]
found my problem during debugging the QtWb plugin !
i didn't have a QTDIR environment variable set,
as temporary workaround i've inserted a Messagebox informing the user about
instead of silently returning doing nothing  :)

Code: [Select]
    if(!wxGetEnv(_T("QTDIR"),&cmd))
    {
        // Not a good Qt installation ;)
        wxMessageBox(_T("Error: environment variable QTDIR not found !"));
        return 0;
    }


beside the fact that i get tons of "dllimport: attribute ignored" warnings using the Qt headers & libs,

the QtWorkbench plugin works fine !
thanks tiwag
Title: Re: QtWorkbench plugin
Post by: mandrav on April 10, 2006, 03:13:06 pm
As a sidenote, do not use wxMessageBox inside C::B and plugins. Use cbMessageBox instead which places the dialog on the correct screen for multi-head systems.
Title: Re: QtWorkbench plugin
Post by: yop on April 10, 2006, 10:54:51 pm
Now that you say this: Yes! That character I had to remove, too. Anyway: Within the archive I've uploaded in this forum  thread this character was already removed. Which version did you use for compiling? The same question I'd like to ask to yop...?!
With regards, Morten.
Version of what?
I took it from the first posting of this thread.

Hmm, how do I add non-Qt libraries? Out of CB I include them in the .pro file, adding lines like
...
As I see in your sources, you just fire up the qmake project generator, which is ok for pure Qt but doesn't cut it for more complex projects. You could take information like this from the CB project and add it to the qmake command line so it will include it in the project file like this:
The plugin includes (or at least is supposed to) the settings from your C::B project, just add your custom settings to the Project->Build Options dialog and the plugin will generate a .pro file with your settings. I don't just fire and forget qmake, I provide a .pro file instead that "describes" the build process. I 've tested it with projects without Qt and it works just fine (though it adds -lqt in your link options but that's just something you have to live with if you use a trolltech product ;))
* Run Menu QtWorkbench->Qmake-Clean, same as above, also the qt1.pro file does still exist, which i would expect to be deleted.
No it shouldn't be deleted (it would be like deleting foo.cbp from codeblocks project foo when cleaning)
from what i've read in the first posting of this thread from yop , i would expect, that when running QtWorkbench->Qmake-Build
after building the *.pro file qmake would be invoked to build the makefile and afterwards running make ?? am i wrong ?
Yeap that's it, qmake is just a makefile generator that takes a configuration file as input (the .pro file). QTDIR I 'm afraid is getting outdated, I should change that (it is still there in Qt 4.x but it's not needed for the actual build process).
As a sidenote, do not use wxMessageBox inside C::B and plugins. Use cbMessageBox instead which places the dialog on the correct screen for multi-head systems.
I won't don't worry :)
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on April 10, 2006, 11:15:11 pm
Version of what?
Version of the QTWorkspace plugin. Basically if it's the one of the first post to the thread or the one I posted. It was to see whether the XRC error is still raised allthough I've removed this NUL character. If you were able to compile and had no troubles you can safely ignore this question... which was actually intended as a hint... ;-)
With regards, Morten.
Title: Re: QtWorkbench plugin
Post by: yop on April 10, 2006, 11:32:03 pm
Version of what?
Version of the QTWorkspace plugin. Basically if it's the one of the first post to the thread or the one I posted. It was to see whether the XRC error is still raised allthough I've removed this NUL character. If you were able to compile and had no troubles you can safely ignore this question... which was actually intended as a hint... ;-)
With regards, Morten.
Hmm, no I haven't tried to build the one you uploaded. When i was asked some questions about the plugin I remember downloading the exact same zip file from the first post and built it without any problems.
I 'll check it out anyway thanks :)
Title: Re: QtWorkbench plugin
Post by: lgarrido on April 11, 2006, 12:11:20 am
Quote
The plugin includes (or at least is supposed to) the settings from your C::B project, just add your custom settings to the Project->Build Options dialog and the plugin will generate a .pro file with your settings.

That would be great! Then I must be missing something. My project depends on /usr/lib/liblrdf.so. I added "lrdf" to "Build Options | Linker | Link libraries" but this has no influence on the .pro file and the build thus fails. The "include" dirs and the "defines" do appear, though.

Luis
Title: Re: QtWorkbench plugin
Post by: briahn06 on April 11, 2006, 03:12:37 am
I just want to say that this plugin is awesome.  As I said in a previous post, I built it, but hadn't tested it yet.  I tested it, and it works flawlessly.  I built it on Windows, CB (4/9).
Title: Re: QtWorkbench plugin
Post by: yop on April 11, 2006, 08:42:50 am
Quote
The plugin includes (or at least is supposed to) the settings from your C::B project, just add your custom settings to the Project->Build Options dialog and the plugin will generate a .pro file with your settings.

That would be great! Then I must be missing something. My project depends on /usr/lib/liblrdf.so. I added "lrdf" to "Build Options | Linker | Link libraries" but this has no influence on the .pro file and the build thus fails. The "include" dirs and the "defines" do appear, though.

Luis
Then it's a bug, I 'll take a look at it thanks. As a temporary solution you can open up the .pro file and add the missing library *outside* the identifiers that say "Code::Blocks identifier" like this: LIBS+=lrdf. Let me know if it works as I want the .pro file I create to let the user edit it by hand (that's why I used identifiers in the first place).
I just want to say that this plugin is awesome.  As I said in a previous post, I built it, but hadn't tested it yet.  I tested it, and it works flawlessly.  I built it on Windows, CB (4/9).
:D
Title: Re: QtWorkbench plugin
Post by: lgarrido on April 11, 2006, 10:38:42 am
Quote
like this: LIBS+=lrdf.

In fact you have to add  LIBS+=-llrdf but yes, it works well like that :)

By the way, there is a small funny typo in the comments of the .pro file: "genegation"

Mmm, I think in the end I will use a autotools + self-made qmake approach and will set C::B to use custom makefiles, since I intend my project to be cross-platform. But your plugin is nice for pure Qt projects.
Title: Re: QtWorkbench plugin
Post by: tiwag on April 11, 2006, 11:25:22 am
is any way known to suppress these nasty warnings about inlined functions declared as dllimport ?
like this one:
Quote
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored
Title: Re: QtWorkbench plugin
Post by: yop on April 12, 2006, 09:34:34 pm
is any way known to suppress these nasty warnings about inlined functions declared as dllimport ?
like this one:
Quote
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored
Never got them :? Which compiler are you using?
Title: Re: QtWorkbench plugin
Post by: tiwag on April 12, 2006, 10:49:00 pm
is any way known to suppress these nasty warnings about inlined functions declared as dllimport ?
like this one:
Quote
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored
Never got them :? Which compiler are you using?

MinGW gcc 3.4.5
Title: Re: QtWorkbench plugin
Post by: mandrav on April 12, 2006, 10:50:10 pm
is any way known to suppress these nasty warnings about inlined functions declared as dllimport ?
like this one:
Quote
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored

By strange coincidence, I stumbled upon this just today. Here's the strange thing:
If I compile with -Wall (all warnings, as usual), I don't get these warnings.
If I compile with -W (standard warnings), I get this  :?

It's strange because "all warnings" should be a superset of "standard warnings only" ?!?
Title: Re: QtWorkbench plugin
Post by: takeshi miya on April 12, 2006, 11:24:01 pm
By strange coincidence, I stumbled upon this just today. Here's the strange thing:
If I compile with -Wall (all warnings, as usual), I don't get these warnings.
If I compile with -W (standard warnings), I get this  :?

It's strange because "all warnings" should be a superset of "standard warnings only" ?!?
I thought the same, but it seems it's not the case.
-W outputs different warnings (and usually more) than -Wall.
There is not any superset flag in GCC for all the warnings.

Note that -Wall does not imply all the other warnings, it's only a set of warnings.
The same is for -W, it's a set of warnings, not implied by any other flag.
And the other important flag is -pedantic, which is also not implied by any other flag.

It's more explained in the manual:
http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Warning-Options.html
Title: Re: QtWorkbench plugin
Post by: yop on April 13, 2006, 12:11:19 am
AFAIR, -Wall is the default setting when generating Makefiles with qmake. Also that dllimport thingy is "ifdefed" out when using qmake to generate gcc Makefiles.  :?
Title: Re: QtWorkbench plugin
Post by: briahn06 on April 13, 2006, 07:51:33 am
Is there anyway to link moc and uic?  I went to the QTWorkBench options, but only found intermediate folders.  This made me think that moc and uic ran by default (whenever necessary), but that doesn't seem to be the case b/c I get errors that are quelled when I run uic and moc manually from cmd.

Thanks, Brian.
Title: Re: QtWorkbench plugin
Post by: tiwag on April 13, 2006, 08:53:48 am
is any way known to suppress these nasty warnings about inlined functions declared as dllimport ?
like this one:
Quote
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored

By strange coincidence, I stumbled upon this just today. Here's the strange thing:
If I compile with -Wall (all warnings, as usual), I don't get these warnings.
If I compile with -W (standard warnings), I get this  :?

It's strange because "all warnings" should be a superset of "standard warnings only" ?!?
what gcc version are you using ?
do you get these warnings from Qt or also from wxWidgets headers ?

when i compile any Qt 4.1.2 project i get these warnings regardless of -W or -Wall compiler switch
using gcc 3.4.5 (maybe i could step back to gcc 3.4.4 in order to test if it happens then too)
Title: Re: QtWorkbench plugin
Post by: mandrav on April 13, 2006, 09:00:38 am
Quote
what gcc version are you using ?
do you get these warnings from Qt or also from wxWidgets headers ?

gcc-3.4.4 with wxWidgets 2.6.2.
Title: Re: QtWorkbench plugin
Post by: mandrav on April 13, 2006, 09:05:50 am
Quote from: http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Warning-Options.html
-Wextra
    (This option used to be called -W. The older name is still supported, but the newer name is more descriptive.)

Now, that explains why I got confused :P
Title: Re: QtWorkbench plugin
Post by: tiwag on April 13, 2006, 10:10:24 am
this is what i get when i build a simple hello world QtApp

Code: [Select]
#include <qstring.h>
#include <qapplication.h>
#include <qpushbutton.h>

int main(int argc, char **argv)
{
    QApplication    app(argc, argv);
    QPushButton     quit("Hello World!");
   
    quit.resize(300, 40);
    quit.setFont(QFont("Arial", 18, QFont::Bold));
    QObject::connect(&quit, SIGNAL(clicked()), &app, SLOT(quit()));
    quit.show();
   
    return app.exec();
}


these tons of warnings are very annoying

Code: [Select]
mingw32-make.exe -f Makefile.Release
mingw32-make.exe[1]: Entering directory `D:/Devel/_projects/Qt/qt2'
g++ -c -Wall -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NEEDS_QMAIN -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"D:/qt412/include/QtCore" -I"D:/qt412/include/QtGui" -I"D:/qt412/include" -I"D:/MinGW/include" -I"D:/Qt412/include" -I"D:/Qt412/include/ActiveQt" -I"D:/Qt412/include/Qt" -I"D:/Qt412/include/Qt3Support" -I"D:/Qt412/include/QtAssistant" -I"D:/Qt412/include/QtCore" -I"D:/Qt412/include/QtDesigner" -I"D:/Qt412/include/QtGui" -I"D:/Qt412/include/QtNetwork" -I"D:/Qt412/include/QtOpenGL" -I"D:/Qt412/include/QtSql" -I"D:/Qt412/include/QtSvg" -I"D:/Qt412/include/QtTest" -I"D:/Qt412/include/QtUiTools" -I"D:/Qt412/include/QtXml" -I"D:/qt412/include/ActiveQt" -I"release" -I"." -I"D:/qt412/mkspecs/win32-g++" -o .objs\main.o main.cpp
In file included from D:/qt412/include/QtCore/qrect.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/painting/qpaintdevice.h:28,
                 from D:/qt412/include/QtGui/qpaintdevice.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qpixmap.h:27,
                 from D:/qt412/include/QtGui/qpixmap.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qicon.h:29,
                 from D:/qt412/include/QtGui/qicon.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qabstractbutton.h:27,
                 from D:/qt412/include/QtGui/qabstractbutton.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qpushbutton.h:27,
                 from D:/qt412/include/QtGui/qpushbutton.h:1,
                 from main.cpp:3:
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:138: warning: inline function `bool operator==(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:139: warning: inline function `bool operator!=(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:166: warning: inline function `bool operator==(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:167: warning: inline function `bool operator!=(const QRect&, const QRect&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:560: warning: inline function `bool operator==(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:561: warning: inline function `bool operator!=(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:573: warning: inline function `bool operator==(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
D:/qt412/include/QtCore/../../src/corelib/tools/qrect.h:574: warning: inline function `bool operator!=(const QRectF&, const QRectF&)' declared as dllimport: attribute ignored
In file included from D:/qt412/include/QtGui/qrgb.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/painting/qcolor.h:27,
                 from D:/qt412/include/QtGui/qcolor.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qpixmap.h:28,
                 from D:/qt412/include/QtGui/qpixmap.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/image/qicon.h:29,
                 from D:/qt412/include/QtGui/qicon.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qabstractbutton.h:27,
                 from D:/qt412/include/QtGui/qabstractbutton.h:1,
                 from D:/qt412/include/QtGui/../../src/gui/widgets/qpushbutton.h:27,
                 from D:/qt412/include/QtGui/qpushbutton.h:1,
                 from main.cpp:3:
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:36: warning: inline function `int qRed(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:39: warning: inline function `int qGreen(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:42: warning: inline function `int qBlue(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:45: warning: inline function `int qAlpha(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:48: warning: inline function `QRgb qRgb(int, int, int)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:51: warning: inline function `QRgb qRgba(int, int, int, int)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:54: warning: inline function `int qGray(int, int, int)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:57: warning: inline function `int qGray(QRgb)' declared as dllimport: attribute ignored
D:/qt412/include/QtGui/../../src/gui/painting/qrgb.h:60: warning: inline function `bool qIsGray(QRgb)' declared as dllimport: attribute ignored
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "qtapp.exe" .objs\main.o  -L"D:\MinGW\lib" -L"D:\Qt412\lib" -L"D:\qt412\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
mingw32-make.exe[1]: Leaving directory `D:/Devel/_projects/Qt/qt2'
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 17 warnings


using gcc 3.4.5, the warning level switches -W, -Wall etc. don't change anything ...

i'm looking for a way to suppress this single warning while all other warnings keep alive ...

maybe anyone had solved this puzzle already
Title: Re: QtWorkbench plugin
Post by: tiwag on April 13, 2006, 10:30:52 am
the same code from above sample

compiled with gcc 3.4.4 with warnings switch -W gives 764 warnings !!!
Code: [Select]
Process terminated with status 0 (0 minutes, 18 seconds)
0 errors, 764 warnings

compiled with gcc 3.4.4 with warnings switch -Wall gives 0 warnings (as Yiannis said)

Title: Re: QtWorkbench plugin
Post by: yop on April 16, 2006, 11:05:28 pm
Is there anyway to link moc and uic?  I went to the QTWorkBench options, but only found intermediate folders.  This made me think that moc and uic ran by default (whenever necessary), but that doesn't seem to be the case b/c I get errors that are quelled when I run uic and moc manually from cmd.

Thanks, Brian.
Depends on what your trying to do and how you want to handle ui files. If you want them to pass through the uic then just add them to your codeblocks project and they are added to your .pro file in the FORMS field.

the same code from above sample

compiled with gcc 3.4.4 with warnings switch -W gives 764 warnings !!!
Code: [Select]
Process terminated with status 0 (0 minutes, 18 seconds)
0 errors, 764 warnings

compiled with gcc 3.4.4 with warnings switch -Wall gives 0 warnings (as Yiannis said)


Seems you 're not alone:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12477
Title: Re: QtWorkbench plugin
Post by: ldindon on April 19, 2006, 04:03:48 pm
Yop,

Code::Blocks + QtWorkbench = ALL WHAT I NEED for Qt cross-platform development.

But I just need some precisions:

1. Where can I found the latest plugin's package? Is it from your original (sticky) post or the patched version of MortenMacFly (http://forums.codeblocks.org/index.php?topic=2253.msg22382#msg22382 (http://forums.codeblocks.org/index.php?topic=2253.msg22382#msg22382)) or somewhere else?

2. Is it possible for you (or some other guys) to release too some pre-builds of the plugin? It will be nice for guy (like me) who do not have a ready to build Code::Blocks plugins environment (CB SDK + wxWidgets).

That's it...

Best regards.
Title: Re: QtWorkbench plugin
Post by: tiwag on April 19, 2006, 05:02:46 pm
... for guy (like me) who do not have a ready to build Code::Blocks plugins environment (CB SDK + wxWidgets)....

that's exactly the point
first, pre-build binaries are not generally usable, because the plugin needs to be built against exactly the same wxwidgets-dll's which are used by the binary release of C::B itself, and different developers may have (slightly) different builds of wxwidgets to build C::B and all plugins.

second point is, that at the moment the only existing C::B SDK is the working version in the svn repository and because of progress of development it is permanent subject of change until the next release of C::B will be ready.

so the only who can build and release binaries is killerbot, who releases the nightly builds,
maybe he will build the Qt-Workbench-plugin and provide it for download ...

the best way is surely if you check out the C::B sources as working version from svn and build it against your own built wxwidgets library.
how to do that can be read in the C::B wiki

btw. i used (and modified slightly) the sources uploaded by Morten

regards
Title: Re: QtWorkbench plugin
Post by: ldindon on April 19, 2006, 05:25:06 pm
Thanks,

I see the problem...let's go for my first steps with subversion (cvs user)!

btw: it will be nice to put the plugin (and others) in http://www.codeblocks.org/downloads.shtml (http://www.codeblocks.org/downloads.shtml) "third party addons" section. It will avoid people parsing forum to get a plugin (I don't who is responsible to update this section).
Title: Re: QtWorkbench plugin
Post by: tiwag on April 19, 2006, 05:49:41 pm
you're welcome :)

...let's go for my first steps with subversion (cvs user)!
when you once got familiar with svn, you'll be satisfied and probably you won't want use cvs again :)

Title: Re: QtWorkbench plugin
Post by: yop on April 19, 2006, 06:15:29 pm
ldindon thanks for your nice words, I 'm happy it fit your needs. I 'm afraid that what tiwag said is 100% correct and I 've explained earlier why a precompiled release isn't possible. I will provide one after the next "stable" release of C::B. Also keep in mind that there is a reason why this is in the development section of the forum and not announced in the wiki or something...

P.S. Morten's .zip has exactly the same sources as the one in the first post with the major difference that Morten put it in the contrib plugins so it should be easier to build and integrade it with C::B. I'll also keep that approach from now on
Title: Re: QtWorkbench plugin
Post by: Michael on April 19, 2006, 08:09:30 pm
Hello,

I just wonder if it would be possible to add the QtWorkbench plugin to the contr. plugins. It seems that several users are interested in it and in Qt. IMHO it would be a nice addition to C::B and would solve the problem of a pre-compiled release.

What do you think about?

Best wishes,
Michael
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on April 19, 2006, 08:17:29 pm
P.S. Morten's .zip has exactly the same sources as the one in the first post with the major difference that Morten put it in the contrib plugins so it should be easier to build and integrade it with C::B. I'll also keep that approach from now on
That's right. If you could (in addition) follow the other plugins concerning the directory structure, too? Thus, have only one base folder with the sources and a single sub-folder for the resources. That would be great... (not pushing anything here, just trying to be consistent with other's work).

With regards, Morten.

Ps.: BTW: I'd vote for integration in SVN, too... but that's only me.
Title: Re: QtWorkbench plugin
Post by: yop on April 20, 2006, 10:32:25 am
...I just wonder if it would be possible to add the QtWorkbench plugin to the contr. plugins. It seems that several users are interested in it and in Qt. IMHO it would be a nice addition to C::B and would solve the problem of a pre-compiled release...
Yiannis has already shown that he has Qt development on his mind. Let's wait for the new compiler framework, this plugin might get obsolete. It could serve the users that need to use qmake for their projects or change to a RAD Qt plugin (I have some ideas but it would introduce Qt dependencies, we 'll see). Anyway Ephialtes will be afriend of Qt :)
That's right. If you could (in addition) follow the other plugins concerning the directory structure, too? Thus, have only one base folder with the sources and a single sub-folder for the resources. That would be great... (not pushing anything here, just trying to be consistent with other's work).
I will, your solution has many advantages
Title: Re: QtWorkbench plugin
Post by: Michael on April 20, 2006, 11:55:33 am
...I just wonder if it would be possible to add the QtWorkbench plugin to the contr. plugins. It seems that several users are interested in it and in Qt. IMHO it would be a nice addition to C::B and would solve the problem of a pre-compiled release...
Yiannis has already shown that he has Qt development on his mind. Let's wait for the new compiler framework, this plugin might get obsolete. It could serve the users that need to use qmake for their projects or change to a RAD Qt plugin (I have some ideas but it would introduce Qt dependencies, we 'll see). Anyway Ephialtes will be afriend of Qt :)

Ok, I understand. Until now I use custom build for Qt, but it is not very practical to add manually moc'ed files to the project.

Let's we wait for the new compiler framework and see after how Qt could be used with C::B :).

Best wishes,
Michael
Title: Re: QtWorkbench plugin
Post by: ldindon on April 21, 2006, 10:36:29 am
I hope that the new compiler framework will permits a better integration of Qt in C::B because, unfortunatly, the plugin (yet and for me) is too limited.

A better integration could be that it could be possible to open .pro file directly with C::B (I guess I dream to much...)

Another solution, could be (like decpp plugin) to have "import from .pro / export to .pro"  options.

Another quick alternative could be that we will be able to specify a .pro to the plugin and that he only manages SOURCES and HEADERS .pro entries according to file add/remove in C::B project. Other qmake options could be managed by hand (allow to use whole power of qmake). The plugin could be in charge to setup C::B (ie: add the pre-build command "qmake <custom.pro>" to generate the Makefile and check "use a existing makefile"). Thus we will be able to use C::B original "Build", "Clean" commands.


That's just ideas, I discover C::B yesterday, so I don't have enough knowledge to know if it could be possible or not...(or probably stupid  :))


Working on a cross-platform IDE with Qt is crutial for me, so maybe (If you and my boss agree) I may contribute to this Qt integration.


Best regards.
Title: Re: QtWorkbench plugin
Post by: yop on April 21, 2006, 11:02:03 am
A better integration could be that it could be possible to open .pro file directly with C::B (I guess I dream to much...)
File->Open->your.pro for now. It is possible and easy to have an option to edit the .pro file in the plugin and I will provide it. Just write your custom things outside the identifiers.

Another solution, could be (like decpp plugin) to have "import from .pro / export to .pro"  options.
"Export" is possible (just needs another menu entry). Import is not at the moment (it would need a better parser than the one I already have).

Another quick alternative could be that we will be able to specify a .pro to the plugin and that he only manages SOURCES and HEADERS .pro entries according to file add/remove in C::B project. Other qmake options could be managed by hand (allow to use whole power of qmake). The plugin could be in charge to setup C::B (ie: add the pre-build command "qmake <custom.pro>" to generate the Makefile and check "use a existing makefile"). Thus we will be able to use C::B original "Build", "Clean" commands.
This option as said above is only one menu entry away. You just have to decide what to provide to the plugin from the C::B envinroment and the rest of the stuff is up to you ;)

Working on a cross-platform IDE with Qt is crutial for me, so maybe (If you and my boss agree) I may contribute to this Qt integration.
Gladly :) I 'm in the same place as you are (a cross-platform IDE with Qt is crutial for me). Believe it or not the requests have just started coming in, so stick around I 'll sure need your help (even using the plugin and posting what you think would be enough, if you are willing to get your hands dirty that's even better). Thanks for the sugestions.
Title: Re: QtWorkbench plugin
Post by: yop on May 01, 2006, 12:23:39 am
There is a new release available (I had some Easter holidays here in Greece and this also was a long weekend so I finally had some free time). All the issues mentioned up to now have been dealt with (more details in the first post). A big thanks to all for the valuable feedback.
The new sources should go in the contrib plugins folder of the CodeBlocks sources.
As you 'll see I've added workspace support and due to this (https://developer.berlios.de/bugs/?func=detailbug&group_id=5358&bug_id=6751) bug it won't work. I decided to add it to make testing and confirming it easier and also see if anyone else has any idea about it (with Yiannis we already spoted a false behaviour of the compiler plugin here (https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=954&group_id=5358)).
That's all, hope it got better :)
Yorgos
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on July 17, 2006, 10:20:23 pm
...I wonder if there is a new version available? Because I receive a strange error that wxMenu could not be found when I try to integrate the latest version into the current SVN head.
Title: Re: QtWorkbench plugin
Post by: yop on July 18, 2006, 07:50:39 pm
Could you try again? New file (qtworkbench-0.4.1.alpha.zip) uploaded.
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on July 18, 2006, 08:37:20 pm
Could you try again? New file (qtworkbench-0.4.1.alpha.zip) uploaded.
Done that and it works again - thanks a lot!
If you now change the output DLL name (for Windows) from "qtworkbech" to "qtworkbench" it's perfect... ;-)
Title: Re: QtWorkbench plugin
Post by: yop on July 18, 2006, 09:43:14 pm
If you now change the output DLL name (for Windows) from "qtworkbech" to "qtworkbench" it's perfect... ;-)
:lol: Nice catch! Uploaded qtworkbench-0.4.2.alpha.zip
Title: Re: QtWorkbench plugin
Post by: mmebane on July 21, 2006, 01:56:46 am
What am I missing here? I got it built, but when I try to run QMake - Build, I get "mingw32-make.exe: *** No rule to make target `sub-Debug'.  Stop."

EDIT: Never mind, I had my old makefile in the folder. Deleted it, and it builds. Yay. But when I set build mode to debug, it complains it can't find QtGuid4. Do I have to build Qt myself to get this?

EDIT2: Trying to rebuild results in "mingw32-make.exe: *** No rule to make target `cleansub-Debug'.  Stop."
Title: Re: QtWorkbench plugin
Post by: sethjackson on July 21, 2006, 03:10:55 am
What am I missing here? I got it built, but when I try to run QMake - Build, I get "mingw32-make.exe: *** No rule to make target `sub-Debug'.  Stop."

EDIT: Never mind, I had my old makefile in the folder. Deleted it, and it builds. Yay. But when I set build mode to debug, it complains it can't find QtGuid4. Do I have to build Qt myself to get this?

EDIT2: Trying to rebuild results in "mingw32-make.exe: *** No rule to make target `cleansub-Debug'.  Stop."

Uhh isn't that supposed to be QtGui4?
Title: Re: QtWorkbench plugin
Post by: mmebane on July 21, 2006, 04:16:37 am
Code: [Select]
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -o "..\bin\Debug\CaveHackQt.exe" ..\obj\Debug\cavehackwindow.o ..\obj\Debug\main.o ..\obj\Debug\weaponEditor.o ..\obj\Debug\moc_cavehackwindow.o ..\obj\Debug\moc_weaponEditor.o  -L"c:\MinGW\lib" -L"c:\Qt\4.1.4\lib" -L"c:\Qt\4.1.4\lib" -lQtCore4 -lQtGui4 -lQtGuid4 -lQtCored4
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lQtGuid4

I assume it's the debug versions of the libraries, but the Qt 4 open source binary installer for Windows doesn't seem to come with them.
Title: Re: QtWorkbench plugin
Post by: iw2nhl on July 21, 2006, 04:41:54 pm
No, it doesn't, you have to recompile Qt yourself in debug mode.
You should have a shortcut in "Start Menu" under Qt called "Qt 4.1.4 (Build Debug Libraries)".

My one contains this:
Starting dir: C:\Qt\4.1.4
Command: %COMSPEC% /k "C:\Qt\4.1.4\bin\qtvars.bat compile_debug"

I hope this helps... ;-)
Title: Re: QtWorkbench plugin
Post by: yop on July 22, 2006, 12:05:24 am
EDIT2: Trying to rebuild results in "mingw32-make.exe: *** No rule to make target `cleansub-Debug'.  Stop."
Each of the targets you create must be in a seperate directory having the same name as the target. Not my fault, blame qmake ;) If you want to generate a debug build use the QMake Project Options menu entry. Another funny thing is that the generated "targets" in the Makefile are named sub-<actual target name>. Again not my fault, blame qmake.
Title: Re: QtWorkbench plugin
Post by: mmebane on July 22, 2006, 11:14:22 pm
No, it doesn't, you have to recompile Qt yourself in debug mode.
You should have a shortcut in "Start Menu" under Qt called "Qt 4.1.4 (Build Debug Libraries)".

My one contains this:
Starting dir: C:\Qt\4.1.4
Command: %COMSPEC% /k "C:\Qt\4.1.4\bin\qtvars.bat compile_debug"

I hope this helps... ;-)

Heh, I can't believe I missed that. Thanks!

EDIT2: Trying to rebuild results in "mingw32-make.exe: *** No rule to make target `cleansub-Debug'.  Stop."
Each of the targets you create must be in a seperate directory having the same name as the target. Not my fault, blame qmake ;) If you want to generate a debug build use the QMake Project Options menu entry. Another funny thing is that the generated "targets" in the Makefile are named sub-<actual target name>. Again not my fault, blame qmake.

I have Code::Blocks set to the standard "Debug" target. I am using the QtWorkbench -> QMake - Rebuild menu item, and Code::Blocks is giving me that message. Is something just screwed up with my system setup?
Title: Re: QtWorkbench plugin
Post by: yop on July 23, 2006, 12:31:26 pm
I have Code::Blocks set to the standard "Debug" target. I am using the QtWorkbench -> QMake - Rebuild menu item, and Code::Blocks is giving me that message. Is something just screwed up with my system setup?
QMake as I use it creates a "top level" .pro file with subdir entries that match your targets. QMake generated Makefiles do not provide (AFAIK) a clean target for the subdir targets. Secondly go to the make options tab of you codeblocks project (nothing to do with QtWorkbench) and see the make options, you'll see that for cleaning a target it has the command "make clean<target>" (no space between clean and target) and that causes the error you see. My suggestion is to change this to "make clean" (will rebuild all targets for your project).
Title: Re: QtWorkbench plugin
Post by: mmebane on July 27, 2006, 03:17:05 am
I had to enable the custom makefile first, but that worked. Thanks for putting up with me. :)
Title: Re: QtWorkbench plugin
Post by: Daemon on August 14, 2006, 05:41:34 pm
Nice idea, but where is attachment from head post? I found only sources at http://tiwag.cb.googlepages.com/home, but binary…
Title: Re: QtWorkbench plugin
Post by: yop on August 14, 2006, 07:39:18 pm
Nice idea, but where is attachment from head post? I found only sources at http://tiwag.cb.googlepages.com/home, but binary…

http://forums.codeblocks.org/index.php?topic=615.msg29529#msg29529

I never uploaded a binary release, only the sources.
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on August 18, 2006, 08:59:42 am
...again (due to the API changes) this plugin is unfortunately broken. Any chance to get a new version?
With regards, Morten.
Title: Re: QtWorkbench plugin
Post by: tiwag on August 18, 2006, 09:04:09 am
...again (due to the API changes) this plugin is unfortunately broken. Any chance to get a new version?
i had already a look on it, but i have to get familiar with the new API first ...
i removed the download from my google pages for now ...
Title: Re: QtWorkbench plugin
Post by: yop on August 18, 2006, 03:17:28 pm
...again (due to the API changes) this plugin is unfortunately broken. Any chance to get a new version?
With regards, Morten.
I was planning a short trip in the weekend but I won't finally make it. So I guess I 'll have a look at it.
Title: Re: QtWorkbench plugin
Post by: zasta on August 30, 2006, 12:10:15 pm
I would test QtWorkbench plugin. Where can I download it?

Zasta
Title: Re: QtWorkbench plugin
Post by: yop on August 30, 2006, 07:18:28 pm
QtWorkbench is currently broken (due to the latest C::B API changes). When I have some time (I was away on a business trip the last few days) I will take a look at it and you will be informed from this thread.
Title: Re: QtWorkbench plugin
Post by: Kayl on September 03, 2006, 09:35:50 am
May I ask a stupid question ?

QT workbench seems to be broken due to API changes in the latest versions, that's why we can't download it.
But hasn't it been built against the 1.02 RC of C::B ? Would it be possible to have a compiled version (at least for windows  :lol:) that works with the 1.0 RC2 ?
Title: Re: QtWorkbench plugin
Post by: yop on September 03, 2006, 03:01:11 pm
RC2 was released on October 2005, the first post on this thread that shows when I started this plugin is dated February 2006 and was based on the svn sources. So no QtWorkbench for the RC2 release, sorry...

P.S. Are you sure you could live with RC2 now that you know the features of the nightbuilds?
P.S.2 I am really busy these days (just returned from holidays so everything is just left behind at work waiting for my attention), so I haven't looked at the new API. I hope I have some free time to take a look at it.
Title: Re: QtWorkbench plugin
Post by: fleuba on September 06, 2006, 08:34:57 am
Hello Yop,

I'm a user of CB and Qt. I've read all the post of this thread about your great plugin.
Did you have time to take a look at the new API and try making your plugin compile and run ?

If you need some help, perhaps one of my developers could help you.
Just keep us informed on this thread, and thank you for your contribution.

Fred
Title: Re: QtWorkbench plugin
Post by: yop on September 10, 2006, 01:23:49 pm
Thanks for your nice words and I 'm sorry it took me so long to reply (I 've been busy). As you can imagine I didn't have much time and probably won't for quite a while. I 've released the latest sources in http://code.google.com/p/qtworkbench/ so whoever is intrested or has some free time can take a look at them. This is the best I can do for now, sorry...
Title: Re: QtWorkbench plugin
Post by: fleuba on September 11, 2006, 08:42:42 am
Hello,

that's fine, we will take a look at your source code and see if we can push it forward. I know it is difficult to match together job, private obligation and open source dev done in "free time".
Your job is already a good step, perhaps we can bring it to another level.

We'll keep you informed here.

Good luck for your job, have a nice time.
Fred
Title: Re: QtWorkbench plugin
Post by: yop on September 11, 2006, 09:19:55 am
If you have any progress with it please let me know (email, forum whatever). I will give you commit access to the sources so you can work more efficiently. I hope my code isn't too bad (haven't seen it for a while  :?). If I find any time to also work with it I 'll make sure the changes are commited. Thanks for your intrest.

Have a good day,
Yorgos
Title: Re: QtWorkbench plugin
Post by: yop on September 16, 2006, 08:45:44 pm
OK I did manage to take a look at the plugin and it is fixed :) I even added support for virtual targets (scopes in the .pro file) and the resulting Makefile builds nicely from the command line. I do have a show stopper in the compiler plugin in int CompilerGCC::Build(const wxString& target). See below (my comments):
Code: C++
  1.     //If the target is empty (it is for building the All virtual target), then get the first of the virtual
  2.     //target's actual and set the realTarget to it's name.
  3.     wxString realTarget = !target.IsEmpty() ? target : (m_SelectedTargets.GetCount() ? m_SelectedTargets[0] : _T(""));
  4.     m_BuildSelectedTargets = m_SelectedTargets;
  5.     m_BuildSelectedTargets.RemoveAt(0);
  6.  
  7.     ProjectBuildTarget* bt = m_Project->GetBuildTarget(realTarget);
  8.     // bt is the first target of the virtual target's members.
  9.         if (UseMake(bt))
  10.     {
  11.         // make sure all project files are saved
  12.         if (m_Project && !m_Project->SaveAllFiles())
  13.             Manager::Get()->GetMessageManager()->Log(_("Could not save all files..."));
  14.         // gets the command for the first target of the virtual target
  15.         wxString cmd = GetMakeCommandFor(mcBuild, bt);
  16.         // Fire and forget, only the first target get's build :(
  17.         m_CommandQueue.Add(new CompilerCommand(cmd, wxEmptyString, m_Project, bt));
  18.     }
  19.  
  20.  

In short words if you have a project that uses a Makefile and virtual targets then if you try to build any virtual target then only that virtual target's first target "member" gets build. So the outputed Makefile from the plugin is actually correct but then the build command tries to only build one of the targets so you get only the first target built. In all other aspects the plugin is the same as you remember it.
Title: Re: QtWorkbench plugin
Post by: mandrav on September 16, 2006, 09:48:02 pm
Yes, after virtual targets were introduced Makefile-based projects have not been tested because I don't have any  :oops: ...
Title: Re: QtWorkbench plugin
Post by: yop on September 16, 2006, 10:14:01 pm
Yeah, I kind of figured that out  :). I know you 'll get there so I don't worry... Anyway the basic funtionality is restored. I just have to get the new API to my head to see what I can do.

Some thoughts:
*New parser using the right tool for the job (no handmade hacks using identifiers :), this has remained since I was using the plugin for myself only and is directly derived from the Makefile generator in the early C::B versions, I 'm sure Yiannis can find some of his code in there ;))
*Remove the menu entry. I think it's better to add an entry in the Build menu that just says "Run QMake" and the user should have the Using Makefiles blah blah enabled.
*Add the QMake options and Edit QMake options in the Project menu.
*Provide some kind of configuration.
Title: Re: QtWorkbench plugin
Post by: Methedrine on September 17, 2006, 05:35:21 pm
First of all, great work there yop! I really like this integration, it eases managing Qt's .pro files by miles :D

However, I am a bit surprised by the QMAKE_CXXFLAGS put into the Debug.pro from your tool. My compiler settings in Code::Blocks for the Debug target are -g and -Wall, yet the Debug.pro file states the following:

Code: [Select]
#Code::Blocks Identifier - START
QMAKE_CXXFLAGS+= -fexpensive-optimizations -O3 -w -W -Wall -pg -g -Wall -Wall -g
#Code::Blocks Identifier - END

That does not look quite correct with repeating several flags and expensive optimizations for a debug version :wink:
Title: Re: QtWorkbench plugin
Post by: yop on September 17, 2006, 09:16:51 pm
Hi Methedrine thanks for your nice words. I am always surprised by the number of people that found the plugin usefull, I never expected that  :D
Anyway could you please take a look to your codeblocks project file ([project name].cbp) to see if these g++ flags are also there? The plugin takes the flags directly as a wxArrayString from the c::b sdk. The duplicate entries could happen if you have the same flags in your compiler options and the project build options (now that I think about it I can fix that easily, typical case of lazy programmer  :lol:).
Since you 're using the plugin what do you think about my suggestions in my previous post?
Title: Re: QtWorkbench plugin
Post by: Methedrine on September 18, 2006, 10:27:56 pm
Hi yop,

I just had a look at my .cpb file and there are not the symbols written into the .pro file - see for yourself:
Code: XML
  1. <Build>
  2.   <Target title="Debug">
  3.     <Option output="Debug/hashphp.exe" />
  4.     <Option object_output="Debug/" />
  5.     <Option type="0" />
  6.     <Option compiler="gcc" />
  7.     <Compiler>
  8.       <Add option="-Wall" />
  9.       <Add option="-g" />
  10.     </Compiler>
  11.     <MakeCommands>
  12.       <Build command="$make -f $makefile $target" />
  13.       <CompileFile command="$make -f $makefile $file" />
  14.       <Clean command="$make -f $makefile clean$target" />
  15.       <DistClean command="$make -f $makefile distclean$target" />
  16.     </MakeCommands>
  17.   </Target>
  18.   <Target title="Release">
  19.     <Option output="Release/hashphp.exe" />
  20.     <Option object_output="Release/" />
  21.     <Option type="0" />
  22.     <Option compiler="gcc" />
  23.     <Compiler>
  24.       <Add option="-O2" />
  25.     </Compiler>
  26.     <Linker>
  27.       <Add option="-s" />
  28.     </Linker>
  29.   </Target>
  30. </Build>
  31.  

Personally I'd love to see qtworkbench menu being removed and the usual compiler interface being used instead. It's just due to some lazyness on my side though (I love simply hitting F5 to start compiling and debugging :P)
Also, moving the Qmake options into the project properties dialog is probably the best thing, but moving them into the project menu is definately a good start!
Title: Re: QtWorkbench plugin
Post by: Cesar on September 30, 2006, 07:16:53 pm
Greetings, yop.
First of all I'd like to thank you for this piece of work you've already done to move C::B towards Qt integration!
Unfortunately it couldn't create *.pro file for me because of lack Release and Debug directories in the project tree. But if I create them manually it seems to work :)
Do you accept patches? ;)
Title: Re: QtWorkbench plugin
Post by: yop on October 01, 2006, 08:34:02 pm
Do you accept patches? ;)
Hi Cesar, nice to see you here :). I sure do  accept patches :D The proposal to give commit access to the sources still stands to anyone intrested ;)
I am working towards a different integration (see previous posts) that will use some lexical analysis tool (I 'm learning my way with antlr, Takeshi Miya praises it all the time so I thought I 'd give it a try) to parse .pro files and get rid of the identifiers (ugly but it did the trick). This way we could also import Qt projects to code::blocks. Anyway I know you have the will to help towards a Qt friendly IDE and code::blocks is a feature rich IDE but doesn't really like Qt (yet). Untill now I 'm the only one who gave it a shot and the results are far from satisfactory but pretty popular, which means that there are people out there looking for an IDE with Qt integration (I 'd say more on windows as in Linux KDevelop is difficult to beat regarding Qt development). Anyway I 'll be glad to hear from you again.

P.S. Regarding the not creating the .pro issue, the targets in c::b project are not the same thing as qmake targets so I had no choice other than using the qmake approach (SUBDIRS) but that means that for each of your targets you must have the respective directory.
Title: Re: QtWorkbench plugin
Post by: Cesar on October 02, 2006, 09:29:53 pm
I'm glad you recognised me :) I'd be happy to help you improove Qt intergration in C::B.
Recently I've found yet another one IDE with an aim to provide Qt environment and integration. Give it a try, take a look at QIde (http://qide.free.fr). Its .pro files handling is amazing! I suppose we could use it, as QIde is GPL-ed as well ;)
Regards, Cesar
Title: Re: QtWorkbench plugin
Post by: yop on October 03, 2006, 09:04:20 am
Give it a try, take a look at QIde (http://qide.free.fr). Its .pro files handling is amazing! I suppose we could use it, as QIde is GPL-ed as well ;)
I have seen it and it is promising but it is quite imature yet. No doubt it has better handling of .pro files than C::B - QtWorkbench as it is built around them but a) I really need all the goodies that C::B provides and b) I need a generic IDE not a Qt based one. Sure most of my gui programming is around Qt (it's my job) but you also know that qmake / .pro files are restrictive. Right now C::B seems like the only C++ IDE that has the potential to become my main IDE both in linux and windows because it has more than average features (with more and more being added) coupled with its cross platform nature. The drawback is that I can't easily use Qt, but as it is with any oss: if like it and you miss a feature then add it, so that's what I did. This plugin started as strictly personal use but given that meny people were asking for Qt integration I released it and it has reached quite a few downloads (which is honestly surprising considering it's quality). That is what makes me want to improve it. Between wanting and actually doing comes my work and my personal life leaving me very little time to actually finish it. Anyway if you are intrested I 'll pm you my email.
Title: Re: QtWorkbench plugin
Post by: Cesar on October 03, 2006, 09:41:03 am
I'm not trying to persuade somebody to switch to other IDE.
First of all it is rude to do this on C::B's forum ;) The second reason is that I can't choose myself, which one to use. Both QIde and C::B have pros and cons.
Anyway, I'm going to join the QIde team as soon as it will move to SVN. Anyway I suppose we could merge our efforts in parsing Qt *.pro files. Right now I'm not familiar with C::B and its API so I might study it for some time.
Regards, Cesar
Title: Re: QtWorkbench plugin
Post by: Methedrine on October 30, 2006, 08:17:56 pm
Any update on the plug-in? :-)

Also, if you want some help coding, just tell us what needs to be done.
Title: Re: QtWorkbench plugin
Post by: zithen on November 01, 2006, 03:57:35 am
Hi, I'm pretty new to programming and I would like to learn via Qt and Code::Blocks.
I'm trying to build the files for the Qtworkbench plugin, but I'm getting build errors, where it says that it can't find certain header files, such as
#include <sys/utsname.h>
#endif
#include <wx/tokenzr.h>
#include <sdk.h>

#include <settings.h>
#include <cbproject.h>
#include <compiler.h>
#include <wx/dir.h>

etc.

Sorry, I'm pretty green, but I'd appreciate the help.  What am I doing wrong and how do I config Code::Blocks to load the files?

Thanks

Adam
Title: Re: QtWorkbench plugin
Post by: Methedrine on November 01, 2006, 12:58:43 pm
Hi, I'm pretty new to programming and I would like to learn via Qt and Code::Blocks.
I'm trying to build the files for the Qtworkbench plugin, but I'm getting build errors, where it says that it can't find certain header files, such as
#include <sys/utsname.h>
#endif
#include <wx/tokenzr.h>
#include <sdk.h>

#include <settings.h>
#include <cbproject.h>
#include <compiler.h>
#include <wx/dir.h>

etc.

Sorry, I'm pretty green, but I'd appreciate the help.  What am I doing wrong and how do I config Code::Blocks to load the files?

Thanks

Adam

You have to make sure that your include paths are correct and contain the files listed above. Apart from that, however, it is unlikely that QtWorkbench will compile because codeblock's plug-in interface recently changed.
Title: Re: QtWorkbench plugin
Post by: zithen on November 02, 2006, 04:41:25 am
Hi,

I appreciate you answering my question.  Since I'm new to all this, I having trouble finding out how to set these files.  How do you set up the include files in code::blocks?  I'm using Windows.

Thanks again...

Adam
Title: Re: QtWorkbench plugin
Post by: yop on November 04, 2006, 03:52:36 pm
Hi zithen,
did you use the provided code::blocks project or did you try to set up your own? The needed directories are already included in that project file so you shouldn't have to do anything. Also the <sys/utsname.h> is a *nix specific inclusion used to determine what kind of *nix flavor you are running on, it shouldn't be included in a windows compilation. Use the provided project file (qtworkbench.cbp) and it hould compile out of the box. I haven't used windows for quite a while though so I 'm not 100% sure that it will but I can take a look at it and get back to you.

Generally for the plugin, I tried to use the actual qmake sources for the parser but I have to reinvent the wheel in many cases (provide a hash table, directory browser, regular expressions etc) that are already there and provided for Qt, so I kind of gave up on the thought and returned to the one I had about using a lexer/parser. I am really stressed at work (and it seems that this will be the case until Christmas) so I don't really know when I 'll be able to pick it up again...
Title: Re: QtWorkbench plugin
Post by: Sepidar on November 15, 2006, 06:44:45 am
hi yop;
after reading all of discussions you made, at last i could not compile qtworkbench with your plugin. so i want to suggest you a bad-but-working way to solve these build-problems specially for dummies like me: just upload files are needed to install the plugin (DLL, ZIP, setup.bat and etc.).

Thanks
Title: Re: QtWorkbench plugin
Post by: stahta01 on November 15, 2006, 04:41:05 pm
FYI:

The code::blocks SVN 3222 caused an compile issue patch below:

Tim S

PS: If you can NOT compile code::blocks from SVN, do NOT ask me any questions about this patch because you can NOT use this patch without knowing how to compile code::blocks from SVN.

Index: src/qtwprogenerator.cpp
===================================================================
--- src/qtwprogenerator.cpp   (revision 13)
+++ src/qtwprogenerator.cpp   (working copy)
@@ -951,7 +951,7 @@
         DoAddProOptions(TargetProBuffer,target);
         DoAddConfiguration(TargetProBuffer,target);
 
-        Manager::Get()->GetMacrosManager()->ReplaceMacros(TargetProBuffer, true);
+        Manager::Get()->GetMacrosManager()->ReplaceMacros(TargetProBuffer);
 
         wxFile file(TargetProFilenameString, wxFile::write);
         cbWrite(file,TargetProBuffer);
Title: Re: QtWorkbench plugin
Post by: yop on November 15, 2006, 11:28:44 pm
Thanks build succesfully in svn build rev 3223 (2006-11-15 22:32:19) gcc 4.1.2 Linux/unicode
Updated the svn sources as well.
Title: Re: QtWorkbench plugin
Post by: joachim on November 28, 2006, 10:13:42 am
I have been trying a while to get the QTWorkbench plugin to work for me. Actually the one shot timer in qtworkbench seemed never to trigger and the menu remained grayed out after each compile. The only way to reset (That I could find) was to restart CB.

Anyway, I added the line
    m_Timer.SetOwner(this,idQtWbTimer); just before starting the timer in the OnProcessTerminated method. It actually made things work. :P See excerpt below. I could submit  a patch but it is really only one line to add.

When reading the wxWidgets documentation it seem like that line has to be called in order to direct the timer message.

void QtWorkbench::OnProcessTerminated(CodeBlocksEvent& event)
{
......
......
......
    wxMenuBar* mbar = Manager::Get()->GetAppWindow()->GetMenuBar();
    if (mbar)
    {
        mbar->Enable(idQtWbMenuCompile,false);
        mbar->Enable(idQtWbMenuClean,false);
        mbar->Enable(idQtWbMenuRebuild,false);
        mbar->Enable(idQtWbMenuDistClean,false);
        mbar->Enable(idQtWbMenuCompileWorkspace,false);
        mbar->Enable(idQtWbMenuRebuildWorkspace,false);
        mbar->Enable(idQtWbMenuCleanWorkspace,false);
    }

    m_Timer.SetOwner(this,idQtWbTimer); 
        m_Timer.Start(500,wxTIMER_ONE_SHOT);
}

Br Joachim

Title: Re: QtWorkbench plugin
Post by: yop on November 28, 2006, 11:02:56 pm
OK I commited this and it works, I haven't checked the build process lately and I don't know what has changed but in the make options I had to put a lot of sub-$target-[action] in order to make it build my project.
Title: Re: QtWorkbench plugin
Post by: joachim on December 04, 2006, 08:13:30 pm
Yes, and without the timer triggering, there was a lot of sub-sub-sub.... built up in the make command. Having passed that we have the next issue. I cannot debug. Actually, the debug command from the menu will first try to build using the regular make. This fails and debug is aborted. (I havent understood why it fails but it does complain about unexpected end of file) I wonder if there is a need to add a QTWorkBench debug command....

BUILD LOG:
/bin/sh: -c: line 2: syntax error: unexpected end of file
cd Debug && mingw32-make.exe debug
mingw32-make.exe: *** [Release\Makefile] Error 258

c:\devel\mingw\bin\mingw32-make.exe[1]: Entering directory `c:/SW_Dev/qt/Empire/Debug'
c:/devel/mingw/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[2]: Entering directory `c:/SW_Dev/qt/Empire/Debug'
mingw32-make.exe[2]: Nothing to be done for `first'.
mingw32-make.exe[2]: Leaving directory `c:/SW_Dev/qt/Empire/Debug'
c:\devel\mingw\bin\mingw32-make.exe[1]: Leaving directory `c:/SW_Dev/qt/Empire/Debug'
Process terminated with status 2 (0 minutes, 13 seconds)
0 errors, 0 warnings

DEBUGGER:
Building to ensure sources are up-to-date
Build failed...
Aborting debugging session
 
Br Joachim
Title: Re: QtWorkbench plugin
Post by: yop on December 04, 2006, 10:35:48 pm
I remember putting the sub- in front of the build targets before requesting to build a target but that is not quite enough. The right thing would be a correctly setup project with all the sub-[project]-[action] make targets already in the make commands list. Probably a c::b project template with an initial .pro file, custom makefile build auto selected and a qmake [project name] prebuild step would be quite enough if you can prepare your own .pro files.

The debug and many more issues have to do with the fact that c::b finds relative paths and initiates builds from the top level directory while qmake and make dive into subdirs. If you have many targets then you can' t even click on an error and go to the respective line/file. I guess this issue and possible solutions will be looked into by the c::b team.

As you can see by the activity in the svn this plugin is not one of my top priorities. I have after searching around and trying out stuff pretty much setup my workbench so this is not a necessity to me anymore. I want to pick it up again if I find the time.
Title: Re: QtWorkbench plugin
Post by: mattie on March 13, 2007, 07:22:17 pm
hi, thank you for this plugin! it does require some effort though for a rookie to get started :)
So I finally got it up and running, but now, when I compile my application, linker complains about not finding qtdesignerd4. Indeed I don't have this file (although I compiled my debug libraries), but why should I? I don't need this DLL and I am compiling a release target anyhow ... :)

and indeed, in the generated .pro file I see:
#Code::Blocks Identifier - START
CONFIG+=    windows uic uitools designer
#Code::Blocks Identifier - END


so I can solve it by appending a line
CONFIG -= designer

but I have the feeling I'm doing something wrong? as I searched the forum and nobody else seems to have this problem..

So I wonder, what am I doing wrong?
Also, I wonder why it seems both debug and release libs are being linked:
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -s -Wl,-subsystem,windows -o "..\bin\Release\PYPicUploader.exe" ..\obj\Release\config.o ..\obj\Release\main.o ..\obj\Release\mainwindow.o ..\obj\Release\moc_mainwindow.o  -L"c:\programs\MinGW\lib" -L"c:\s9\programs\Qt\4.2.0\lib" -L"c:\s9\programs\Qt\4.2.0\lib" -lmingw32 -lqtmaind C:\programs\wxWidgets-2.6.3\lib\gcc_dll\libwxmsw26u.a -lQtCore4 -lQtGui4 -lQtNetworkd4 -lQtDesignerd4 -lQtUiToolsd -lQtXmld4 -lQtGuid4 -lQtCored4
C:\programs\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lQtDesignerd4


thanks
matthias
Title: Re: QtWorkbench plugin
Post by: H0LL0 on May 04, 2007, 01:52:36 am
hi @ all

i want to use qt under windows and there arent many (cheap ;)) ides offering a good support, c::b seems to be a light in the dark for me ;)

i hope i'm right here. i got a problem installing the plugin. somebody else posted same issue. dont find a solution for me :/

windows, wx 2.8.3 (just compiled!), cb nightly from 1st or 2nd may.

i try to compile qt workbench there comes the following:
Code: [Select]
:: === QtWorkbench, default ===
ld.exe:: cannot find -lcodeblocks
:: === Build finished: 1 errors, 1 warnings ===

so far so good, so i read somewhere i should recompile code blocks for the libraries.
here i go, and what was there:
Code: [Select]
:: === Code::Blocks, scintilla ===
ld.exe:: cannot find -lwxmsw28u
:: === Build finished: 1 errors, 0 warnings ===

soooooooooooo the wx variable is set to
base: ... wxWidgets-2.8.3
include: ... wxWidgets-2.8.3\include
lib: ... wxWidgets-2.8.3\lib\gcc_lib
(without the dots ;))

i have to say, that i dont know much about libraries (always thought they should end with .dll or .lib ^^), but there is no file similar to this on my hd. i could offer some files in the gcc_lib dir like libwxmsw28d_core.a or libwxbase28d.a

any help?
Title: Re: QtWorkbench plugin
Post by: Biplab on May 04, 2007, 04:17:47 am
soooooooooooo the wx variable is set to
base: ... wxWidgets-2.8.3
include: ... wxWidgets-2.8.3\include
lib: ... wxWidgets-2.8.3\lib\gcc_lib
(without the dots ;))

Code::Blocks expect lib dir to be wxWidgets-2.8.3\dll\gcc_dll during compilation of C::B, not the one you are using. If your system do not have that dir, recompile your wx as a Shared library (create a dll).
Title: Re: QtWorkbench plugin
Post by: H0LL0 on May 04, 2007, 03:35:06 pm
args, is qtworkbench actually running with wxwidgets 2.8.3?
Title: Re: QtWorkbench plugin
Post by: yop on May 05, 2007, 05:08:21 pm
OK I updated the project to build using wx 2.8.3 and changed them to the current format. Worked without problems for me. It 's revision 18 in the svn.
Title: Re: QtWorkbench plugin
Post by: yop on May 05, 2007, 06:23:41 pm
I added binary releases:
http://code.google.com/p/qtworkbench/downloads/list

Go to Plugins->Manage Plugins->Install New and select the file you downloaded. Restart c::b and voila.You can find one that is working with nightly build of 03/05/2007 for sure (and probably with earlier ones).
Title: Re: QtWorkbench plugin
Post by: H0LL0 on May 09, 2007, 10:25:11 pm
first big thx, i tried to compile myself, but i failed cause i couldnt find older versions of xwidgets :)

is it possible to single step / set breakpoints / read variables?

the rebuild, clean and distclean options dont work, something wrong with my settings?
Code: [Select]
mingw32-make.exe: *** No rule to make target `cleansub-Debug'.  Stop.
Title: Re: QtWorkbench plugin
Post by: yop on May 10, 2007, 08:56:54 pm
Try to avoid using more than one targets if you need debuging facilities.
Go to the make options of your project and change "make clean$target" to "make clean".
Title: Re: QtWorkbench plugin
Post by: b_coded on May 13, 2007, 12:18:50 pm
Hi yop,
Thanks for your plugin. I noticed it is broken under the C::B builds rev 3948 and 3960.
If you have time to catch up with the C::B builds, it would be great.

Wim B
Title: Re: QtWorkbench plugin
Post by: yop on May 13, 2007, 10:28:58 pm
OK done. That's why I didn't want to upload a binary release before a stable c::b one. The old(er) release is still there for any one interested. You just have to select "All downloads" to see it on the list as I marked it as deprecated. Again this binary release had quite quite a few downloads considering that there are many alternatives for Qt development. You really like Code::Blocks huh? Maybe I should freeze the rest of my projects I am messing around with and pick it up again... It's wx and C++ time again :-) let's see what I can remember :-D
Title: Re: QtWorkbench plugin
Post by: b_coded on May 16, 2007, 09:39:04 pm
Thanks for the update, yop  8)

Since I am rather new to C::B and Qt, it toke me a while to get things to work.
I now use the following steps to create a new Qt project. Maybe it can help other newcomers.

Directly after creating a new Qt project within C::B:


The procedure works, but maybe things can be done simpler. Give me a (yell) reply if this is the case.

yop: would it be possible to include any of these steps in the plugin?

Wim B
Title: Re: QtWorkbench plugin
Post by: bfr on May 17, 2007, 04:23:28 am
This looks awesome - this is exactly what I need!

Except, I'm having trouble with it.  I'm using Qt 4.2.3 on Windows XP and used the Windows installer.  I get "The QTDIR variable is not set.Please check your Qt installation"

What should I do?
Title: Re: QtWorkbench plugin
Post by: Mayler on May 17, 2007, 06:29:30 am
Go My Computer -> Properties -> Advanced Tab -> Environment Variables and add the QTDIR key with C:\Qt\4.2.3 or where you installed it.
Title: Re: QtWorkbench plugin
Post by: yop on May 17, 2007, 11:06:13 pm
@b_coded: I generally choose to create a simple console project and use the Qt Workbench to generate my targets but your approach is just fine as well. If I need more than one targets I add the respective folders. For the clean / distclean problems you mentioned I haven't thought of anything yet.

@bfr: QTDIR is a leftover from Qt 3.x. I am working on a configuration dialog to set the Qt installation path, so QTDIR envar won't be checked anymore.
Title: Re: QtWorkbench plugin
Post by: bfr on May 17, 2007, 11:37:13 pm
OK.  I'm so glad you are made and are continuing to work on this project.   :)

Just to be sure, I would put this in the "System Variables" Path variable, not the "User Variables for Owner" PATH variable, right?
Title: Re: QtWorkbench plugin
Post by: Mayler on May 18, 2007, 12:04:55 am
that's right... One time user variable didnt worked for me.
Title: Re: QtWorkbench plugin
Post by: bfr on May 19, 2007, 12:32:59 am
Cool.  I set up the QTDIR variable and build the default Qt program that Code::Blocks generate.  But, when I tried to build the program I originally was having problems with (which I was told was a problem with MOC not being run), I still get the following errors:

Code: [Select]
objReleasemain.o:main.cpp:(.text+0x68):: undefined reference to `vtable for MainWindow'
objReleasemain.o:main.cpp:(.text+0x6f):: undefined reference to `vtable for MainWindow'
objReleasemain.o:main.cpp:(.text+0xdf):: undefined reference to `MainWindow::staticMetaObject'
objReleasemain.o:main.cpp:(.text+0x17f):: undefined reference to `MainWindow::staticMetaObject'
objReleasemain.o:main.cpp:(.text+0x3c8):: undefined reference to `vtable for MainWindow'
objReleasemain.o:main.cpp:(.text+0x3cf):: undefined reference to `vtable for MainWindow'
objReleasemain.o:main.cpp:(.text+0x444):: undefined reference to `MainWindow::staticMetaObject'
objReleasemain.o:main.cpp:(.text+0x4ec):: undefined reference to `MainWindow::staticMetaObject'
objReleasemain.o:main.cpp:(.text+0x77e):: undefined reference to `vtable for MainWindow'
objReleasemain.o:main.cpp:(.text+0x785):: undefined reference to `vtable for MainWindow'
objReleasemain.o:main.cpp:(.text+0x7e1):: undefined reference to `vtable for MainWindow'
objReleasemain.o:main.cpp:(.text+0x7f5):: undefined reference to `vtable for MainWindow'
:: === Build finished: 12 errors, 0 warnings ===

Here is a link to the code (and by the way, I'm only building a Release target) (http://rafb.net/p/SrWyF216.html).

Is there something wrong with my code?  Or is this a problem with QtWorkBench?  Or did I not configure QtWorkBench properly?  In the "Qt Project Options" menu as part of QtWorkBench, I have "Release" checked under "Build Mode" - "Qt" checked under "Requirements" - "Core" and "Gui" checked under "Modules to Load" - and I have C:\Qt\4.2.3\bin as my directory for the moc files, uic files, and rrc files.
Title: Re: QtWorkbench plugin
Post by: Mononofu on May 26, 2007, 11:17:11 am
I've also a problem with this plugin. It compiled properly (Linux + C::B from 23. 5.), but when I copy the .zip and the .so file in the share/codeblocks and share/codeblocks/plugin/ directories, I always get this error when starting Code::Blocks:
[11:14:54.724]: ERROR: /home/mononofu/.codeblocks/share/codeblocks/plugins/libqtworkbench.so: not loaded (missing symbols?)

What am I doing wrong?

greets, Mononofu

PS: I used the sources from the SVN.
Title: Re: QtWorkbench plugin
Post by: yop on May 26, 2007, 12:54:46 pm
Be patient. I hadn't touched the plugin for ages. I 'm changing the parser, adding a configuration dialog and the way that .pro are stored and qmake invoked. It' ll take a few days, but I think it 'll become experimentally usable under all setups. You 'll be even able to debug multiple targets :-). My thoughts:
Title: Re: QtWorkbench plugin
Post by: yop on May 26, 2007, 01:03:17 pm
[11:14:54.724]: ERROR: /home/mononofu/.codeblocks/share/codeblocks/plugins/libqtworkbench.so: not loaded (missing symbols?)
Byo was reported with the same thing some time ago for wxSmith. I don't know how he solved this, I 'll ask when we get there :-)
Title: Re: QtWorkbench plugin
Post by: Gagh on May 26, 2007, 05:38:55 pm
[11:14:54.724]: ERROR: /home/mononofu/.codeblocks/share/codeblocks/plugins/libqtworkbench.so: not loaded (missing symbols?)
Byo was reported with the same thing some time ago for wxSmith. I don't know how he solved this, I 'll ask when we get there :-)

Think this is just the way you setup your linker, with or without symbols. Leave them out and you get the above.
Title: Re: QtWorkbench plugin
Post by: yop on June 05, 2007, 03:33:44 am
If anyone feels like an early adopter, I have merged the branch I was working on to the trunk in the plugin svn. Instructions on how to use the updated plugin are in http://code.google.com/p/qtworkbench/wiki/PluginUsage
Please remove anything you have installed from the previous versions of the plugin.
* Debugging works
* Multiple targets work
* Build log takes you to the correct file on errors
* You 'll get code completion if you follow the instructions
* The parser is simpler and better but not as good as I want (yet)
* Build starts from Code::Blocks build system
* ... (many more things work)...
* Oh and it also works under linux :-)

If anyone finds the time to check it out, please report whatever doesn't work for you or you don't like in http://code.google.com/p/qtworkbench/issues/list
I 'll be away, so you won't see any activity during the next week. When I return I 'll probably release a binary plugin for importing.
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on June 05, 2007, 08:03:52 am
If anyone feels like an early adopter, I have merged the branch I was working on to the trunk in the plugin svn.
The page says:
Code: [Select]
# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://qtworkbench.googlecode.com/svn/trunk/ qtworkbench
...but this doesn't work for me...?! Am I missing something?!
With regards, Morten.
Title: Re: QtWorkbench plugin
Post by: stahta01 on June 05, 2007, 08:35:53 am
If anyone feels like an early adopter, I have merged the branch I was working on to the trunk in the plugin svn.
The page says:
Code: [Select]
# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://qtworkbench.googlecode.com/svn/trunk/ qtworkbench
...but this doesn't work for me...?! Am I missing something?!
With regards, Morten.

Code: [Select]
svn checkout http://qtworkbench.googlecode.com/svn/trunk/ qtworkbench

It just worked for me OK.

Try it without "/"
Code: [Select]
svn checkout http://qtworkbench.googlecode.com/svn/trunk qtworkbench

Code: [Select]
svn --version

svn, version 1.4.2 (r22196)
   compiled Nov  3 2006, 16:53:07

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

Tim S
Title: Re: QtWorkbench plugin
Post by: yop on June 05, 2007, 09:21:42 am
Morten, which svn client do you use? I have tried anonymous checkout with svn, rapidsvn and tortoise svn; all of them worked.
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on June 05, 2007, 10:07:19 am
Morten, which svn client do you use? I have tried anonymous checkout with svn, rapidsvn and tortoise svn; all of them worked.
It still doesn't work. I tried svn command line client and SmartSVN (Windows) - both fail with the same error message. :-(
Anyways - a reason could be that I'm behind a firewall (but it's port 80...?!). I'll try again when I'm at home and report back if if works there... nothing to really worry about...
With regards, Morten.
Title: Re: QtWorkbench plugin
Post by: H0LL0 on June 11, 2007, 12:48:12 pm
plz could anyone hand me a newer binary release? i dont get it compiled...

Code: [Select]
:: === QtWorkbench, default ===
D:\CppDevelop\Eigene\QtWorkBench\src\qtworkbench.cpp:9: sdk.h: No such file or directory
D:\CppDevelop\Eigene\QtWorkBench\src\qtworkbench.cpp:10: annoyingdialog.h: No such file or directory
D:\CppDevelop\Eigene\wxWindows\include\wx\platform.h:196: wx/setup.h: No such file or directory
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:98: #error "wxUSE_DYNLIB_CLASS must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:106: #error "wxUSE_EXCEPTIONS must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:114: #error "wxUSE_FILESYSTEM must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:122: #error "wxUSE_FS_ARCHIVE must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:135: #error "wxUSE_DYNAMIC_LOADER must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:143: #error "wxUSE_LOG must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:151: #error "wxUSE_LONGLONG must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:159: #error "wxUSE_MIMETYPE must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:175: #error "wxUSE_PRINTF_POS_PARAMS must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:183: #error "wxUSE_PROTOCOL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:225: #error "wxUSE_REGEX must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:233: #error "wxUSE_STDPATHS must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:241: #error "wxUSE_XML must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:249: #error "wxUSE_SOCKETS must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:257: #error "wxUSE_STREAMS must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:265: #error "wxUSE_STOPWATCH must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:273: #error "wxUSE_TEXTBUFFER must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:281: #error "wxUSE_TEXTFILE must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:297: #error "wxUSE_URL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:305: #error "wxUSE_VARIANT must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:325: #error "wxUSE_ABOUTDLG must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:333: #error "wxUSE_ACCEL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:341: #error "wxUSE_ANIMATIONCTRL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:349: #error "wxUSE_BITMAPCOMBOBOX must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:357: #error "wxUSE_BMPBUTTON must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:365: #error "wxUSE_BUTTON must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:373: #error "wxUSE_CALENDARCTRL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:381: #error "wxUSE_CARET must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:389: #error "wxUSE_CHECKBOX must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:405: #error "wxUSE_CHOICE must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:413: #error "wxUSE_CHOICEBOOK must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:421: #error "wxUSE_CHOICEDLG must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:429: #error "wxUSE_CLIPBOARD must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:437: #error "wxUSE_COLLPANE must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:445: #error "wxUSE_COLOURDLG must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:453: #error "wxUSE_COLOURPICKERCTRL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:461: #error "wxUSE_COMBOBOX must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:469: #error "wxUSE_COMBOCTRL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:477: #error "wxUSE_DATAOBJ must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:485: #error "wxUSE_DATAVIEWCTRL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:493: #error "wxUSE_DATEPICKCTRL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:501: #error "wxUSE_DIRPICKERCTRL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:509: #error "wxUSE_DISPLAY must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:517: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:525: #error "wxUSE_FILEDLG must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:533: #error "wxUSE_FILEPICKERCTRL must be defined."
D:\CppDevelop\Eigene\wxWindows\include\wx\chkconf.h:541: #error "wxUSE_FONTDLG must be defined."
:: More errors follow but not being shown.
:: Edit the max errors limit in compiler options...
:: === Build finished: 50 errors, 0 warnings ===
there is no sdk.h on my entire pc, cant imagine where it should come from, i compiled wxwidgets -.-

actually i dont want to compile qtworkbench myself, i simply want to use it :p
Title: Re: QtWorkbench plugin
Post by: bfr on June 11, 2007, 07:05:47 pm
It seems like you're trying to use wxWidgets with QtWorkBench.  QtWorkBench is for Qt.  ;)
Title: Re: QtWorkbench plugin
Post by: Biplab on June 11, 2007, 07:30:08 pm
1. sdk.h : Download Code::Blocks source. The file is inside src/include directory.

2. If you've compiled wxWidgets, then wx/setup.h file will be inside <wxWindows_dir>\lib\<compiler_name>_<lib_config> dir.
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on June 11, 2007, 07:50:02 pm
Anyways - a reason could be that I'm behind a firewall (but it's port 80...?!). I'll try again when I'm at home and report back if if works there... nothing to really worry about...
Reporting back: It's working... ;-)
For all users having the same issue. If you are behind a proxy you may not be able to checkout from *any* http related SVN repository. Either you switch off the proxy (if that is possible) or use th svn protocol (no possible with googlecode).
With regards, Morten.
Title: Re: QtWorkbench plugin
Post by: H0LL0 on June 11, 2007, 09:05:39 pm
my problem is the following: im a programming beginner, i learn programming with qt atm. i need a good ide, codeblocks is a good one. qtworkbench is a nice plugin
BUT for the installation, i need to compile wxwidgets, codeblocks and the pulgin, which takes years, and is not that easy... why cant you just put a binary release up :(

p.s.: compiling c::b gives me the same error, as in the past...
Code: [Select]
ld.exe:: cannot find -lwxmsw28u
:: === Build finished: 1 errors, 0 warnings ===
Title: Re: QtWorkbench plugin
Post by: raph on June 12, 2007, 05:04:15 pm
p.s.: compiling c::b gives me the same error, as in the past...
Code: [Select]
ld.exe:: cannot find -lwxmsw28u
:: === Build finished: 1 errors, 0 warnings ===
You did not compile wxWidgets correctly or codeblocks can't find it.
Just follow this guilde (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows) but use wxWidgets 2.8.4 (wiki needs to be upated).

Regards
raph
Title: Re: QtWorkbench plugin
Post by: yop on June 12, 2007, 07:15:49 pm
I have put a binary release here: http://code.google.com/p/qtworkbench/downloads/detail?name=qtworkbench-0.4.1alpha.cbplugin
I have made quite a few changes lately and for the changed plugin I don't have a binary release yet because I didn't have the time (right now I 'm in Madrid on a business trip).
Just read the latest posts in the current thread. You 'll get the binary release sometime next week.
Title: Re: QtWorkbench plugin
Post by: H0LL0 on June 13, 2007, 02:10:52 pm
big thx :)

i hope you didnt misunderstand me. i didnt want to give too much pressure to you.
we're programming c++ with qt and opengl in our university atm, and after 1.5 years of programming, im a hero in bringing ides to work, cause there is no ide you get to work properly.
eclipse is made for java. you can make it work with c++ qmake n stuff, but configuring and installing everything takes around 3-4 hours (with a tutorial). the code completion is horrific, and the debugging doesnt work properly. and eclipse does what it wants with cvs archives. its overloaded with java functions, you cannot use in c++, which increases the used memory like hell
kdevelop is ok, but the cvs support isnt that good, and: it doesnt work under windows (yet) and most beginners will prefer windows, especially if they need to have opengl running what is a proglem with some graphic adapters. and vmware is freakin slow ;)
visual studio is good. you have to configure only a little bit, and it works with all functions you need. BUT its from MS and its expencive. havent tried it out that much yet.
codeblocks takes all the advantantages together. but atm its way too much configuring for my prupose. if the plugin would be precompiled, it would shrink the installation-work from 3 hours to 20 minutes, which would be a real advantage if you want to show it to beginners.
xcode is perfect. but... who of all the poor students can afford a mac? :\

im a little fed up with all that ide configuring. you are the community which can make the life easyer for hundrets of students on my university.... so once again: big thx for your help so far :D
Title: Re: QtWorkbench plugin
Post by: yop on June 17, 2007, 10:36:39 pm
Visit http://code.google.com/p/qtworkbench/ there is a new binary release available (0.5.0) that includes all the changes mentioned in my last posts. Please read the usage instructions first: http://code.google.com/p/qtworkbench/wiki/PluginUsage
Title: Re: QtWorkbench plugin
Post by: pibeac on July 02, 2007, 07:42:32 pm
I've downloaded QtWorkbench0.5.0Alpha ( which i found as the latest version ).

I created a Dynamic Link Library project with codeBlock and i used your QTWorkbench to create the .pro and makeFile files. It did work fine, but when i compiled ( using the makefile ) it created a lib.a and an executable file and no lib.dll... So i checked in the .pro file and found that the following:
...
CONFIG += qt dll debug
...
TEMPLATE += lib

i changed the line "TEMPLATE += lib" for "TEMPLATE = lib" and rerun qmake -Makefile to regenerate the makefile, then i recompiled my project and then the output was a lib.a and lib.dll and there was no executable file anymore!

I believe that the TEMPLATE variable holds a "app" and the with the += we add the lib.... so with the "=" we overwrite completely the TEMPLATE variable and gives the correct output.

I am not sure if it's a bug with your plugin or just me who doesn't know how to use it correctly...
i am a bit new to qt-Code::blocks-qmake.

By the, that plugin is really nice!!!

Thanks!
Title: Re: QtWorkbench plugin
Post by: yop on July 03, 2007, 06:27:50 pm
It 's a bug, I rewrote the .pro parser and generator for version 0.5 and it still isn't what I 'd like it to be but it's much better than what it used to be ;)
If you have any suggestions and/or more bugs or inconveniences while working with the plugin you are welcome to add them to the issue tracker in http://code.google.com/p/qtworkbench/issues/list
Title: Re: QtWorkbench plugin
Post by: pibeac on July 03, 2007, 09:53:43 pm
Thanks for the reply, i plan on using your plugIn a lot, so i will contribute to the bug list =)
Title: Re: QtWorkbench plugin
Post by: 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 "" ?
Title: Re: QtWorkbench plugin
Post by: yop on July 06, 2007, 12:37:59 pm
Hi,
I just returned from yet another business trip and I 'll download texmaker to check issue #7.
Title: Re: QtWorkbench plugin
Post by: yop on July 14, 2007, 12:41:19 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 "" ?

H0LL0 you might be interested in http://code.google.com/p/qtworkbench/wiki/ImportingProjects ;)
Title: Re: QtWorkbench plugin
Post by: AnTeevY on July 17, 2007, 03:15:43 pm
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 ;)
Title: Re: QtWorkbench plugin
Post by: yop on July 17, 2007, 04:15:53 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?
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).
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."?
This should not happen.
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?
This should not happen.
4. Something about makefiles: why does it always create both release and debug ones?
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 :-)
Title: Re: QtWorkbench plugin
Post by: AnTeevY on July 17, 2007, 04:30:26 pm
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 :)
Title: Re: QtWorkbench plugin
Post by: yop on July 17, 2007, 05:09:14 pm
...(because normally it searches for "makefile" and not for "makefile.targetname" [this isn't mentioned in the setting-up-a-project-tutorial?])...
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 :-) )


Title: Re: QtWorkbench plugin
Post by: yop on July 17, 2007, 10:11:45 pm
I 'm sorry but I can't reproduce these problems. I started off with a new project and my all time favorite victim (the Qt examples) and I selected a "Debug" project then switched to Release from Qt Project options and got a Release build. Then vice versa and it worked again.

Then I added another target and it also worked as expected.

Then I started removing Makefiles (all of them, some of them whatever I could think of) and only the appropriate Makefiles were generated.

I did find a problem in the naming of the output caused because in the .pro I use a += operator for the output but this is fixed in the upcoming release.

I used rev 4263 build of Code::Blocks and QtWorkbench 0.5.0
Title: Re: QtWorkbench plugin
Post by: AnTeevY on July 17, 2007, 10:49:30 pm
Okay, sorry.
I've just tried a lot an finally found out my fault... I changed the "Make" Commands for the project itself but of course they got overwritten by those of the build target, which I didn't change. That's why the compiler did not find the makefile, so I changed it in the dialog where I selected "This is a custom Makefile". I think this caused all those strange bugs. Sorry again.

But one more question: is it possible to build both release and debug at once? Ok, in the Qt Project Options you can choose them both, but of course this does not work, because in both the makefile.targetname.release and makefile.targetname.debug it says:
TARGET         = targetname.exe
DESTDIR_TARGET = bin\targetname\targetname.exe

If I create a empty project with Release and Debug targets, then run "qmake -project" and "qmake projectname", in C::B I can choose between both targets and when compiling the exe's are created in Debug\ resp. Release\ folders. Is this possible with the plugin? I think, you need 2 build targets, but then the plugin creates two project files, and then there are 6 makefiles... is there an easier way?
Title: Re: QtWorkbench plugin
Post by: yop on July 17, 2007, 11:29:39 pm
Don't apologize, I already mentioned that it's quite difficult to remember to make all those little tweakings (I wonder if such a word exists) here and there to prepare your project and targets. When I release 0.5.1 (it's necessary to fix this bug (http://code.google.com/p/qtworkbench/issues/detail?id=6&can=1) with the operators in the .pro files) I will prepare wizards for project and target generation so it's (hopefully) trivial to prepare them.
As for your question no there isn't an easier way or at least I can't think of something, except if C::B itself has some kind of magic under the hood (which frankly happens quite often).
Title: Re: QtWorkbench plugin
Post by: Mayler on July 21, 2007, 06:05:53 pm
I cannot compile even the TexMaker... I made exactly what the wiki is saying... What's Wrong?

My error in my project ( equal the texmaker )

g++: Raiox.Debug: No such file or directory
mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/Mayler/Desktop/rx'
mingw32-make.exe[1]: *** [bin\RaioX.exe] Error 1
mingw32-make.exe: *** [debug] Error 2
Process terminated with status 2 (1 minutes, 4 seconds)

Using gcc 3.4.5, Qt 4.3, CB 4285 and QtWorkbench 0.5.0
Title: Re: QtWorkbench plugin
Post by: yop on July 21, 2007, 07:13:25 pm
What is "Raiox" ? Have you setup a target named like that?
Title: Re: QtWorkbench plugin
Post by: Mayler on July 21, 2007, 07:23:52 pm
Yes... I will show the message in texmaker.

mingw32-make.exe -f Makefile.texmaker.Debug
mingw32-make.exe[1]: Entering directory `C:/Documents and Settings/Mayler/Desktop/texmaker'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -s -Wl,-subsystem,windows -mthreads -Wl -o "bin\texmaker.exe" object_script.texmaker texmaker.Debug  -L"c:\Qt\4.3.0\lib" -lmingw32 -lqtmaind -LC:\MinGW\lib -lQtGuid -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCored -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
g++: object_script.texmaker: No such file or directory
mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/Mayler/Desktop/texmaker'
g++: texmaker.Debug: No such file or directory
mingw32-make.exe[1]: *** [bin\texmaker.exe] Error 1
mingw32-make.exe: *** [debug] Error 2
Process terminated with status 2 (0 minutes, 3 seconds)
0 errors, 0 warnings
Title: Re: QtWorkbench plugin
Post by: yop on July 21, 2007, 07:37:20 pm
I am preparing a new release that will be out today or tomorrow. Actually it is ready but I 'm trying the linux build with automake. Check if it works for you as the while I was writing the wiki entry I was using the head build and not 0.5.0. I 'll also check when I 'm finished with the new release.
Title: Re: QtWorkbench plugin
Post by: yop on July 21, 2007, 10:50:11 pm
The new release is available in http://code.google.com/p/qtworkbench/
I have also added support for automake along with a patch in the C::B build process so is should be easier for linux users to try it out. Just take a look at the plugin installation instructions to see how you can build it in linux.
Title: Re: QtWorkbench plugin
Post by: Mayler on July 22, 2007, 12:23:09 am
Now it's working! :D
Thanks.

One suggestion is a option : This is a Custom Project File... But will need a good parser to make this option available.
Title: Re: QtWorkbench plugin
Post by: yop on July 22, 2007, 09:26:45 am
Not only a good parser but also a two way communication with C::B, preservation of the user formating of .pro files (like keeping comments for instance) and handling of advanced features of qmake (conditionals, scopes). Now QtWorkbench only reads settings that are present in both .pro and C::B project file from the C::B project, so even even you try to use it with handwritten .pro files it will most probably overwrite (some of) your settings. Anyway editing by hand is planned ;-)
Title: Re: QtWorkbench plugin
Post by: iw2nhl on August 06, 2007, 12:01:02 pm
Hi yop,
some of the things you are doing have already be done in another OpenSource project: QMake Manager which is a plugin for KDevelop.
Why not join the forces?
I've already posted some bug reports for QMake Manager and the latest release is quite stable and functional.
It supports custom .pro files (with comments too) and scopes.
Moreover it adapts to the configuration of the user, eg. it finds if the default is release or debug so to add/remove options accordingly.
I like both works, QtWorkbench and QMake Manager. Both make life easier for a Qt developer.
The idea is: instead of use the time to invent and implement what has already been done, use it to add new features.
This should happen in both directions between the two projects.

Sorry for my bad english! I hope it is clear what I mean and I hope this comment is not mis-interpreted: it's not against your very good work, I just want to help it become even better!

Thanks,
Alessandro
Title: Re: QtWorkbench plugin
Post by: yop on August 06, 2007, 12:34:38 pm
Don't worry, I didn't misinterpret your point. I have already checked the KDevelop implementation and I don't think that my implementation is ever going to match up with them, KDevelop will always have the best available support for Qt (as I guess C::B has for wxWidgets).
Title: Re: QtWorkbench plugin
Post by: iw2nhl on August 06, 2007, 02:36:04 pm
Ok, thank you for the reply and keep up your good work!
Title: Re: QtWorkbench plugin
Post by: wildcart on October 22, 2007, 11:56:28 pm
First of all thanks for this nice work. I've been using c::b and your plug-in early this year and was quit satisfied. I recently updated to the current versions of c::b and qtworkbench and I was confused.... doesn't the plug-in work with new version of c::b (the menu item was missing). Then I found the new documentation on your site... Again, nice work :)

However, I have one problem I can't seem to figure out. Whenever I want to debug something, the log states the debugger is started but execution does not break at breakpoints. This only happens if I modify the project to work with QT or in other words: as long as I stick to supplied project types debugging works fine. Among others, I am testing the console project. Applying the steps mentioned in your documentation to switch a Project to use qtworkbench debugging stops to work. The only thing I see with all projects is the debugger complaining about some source file it can't find (the ones with breakpoints in them), e.g.: No source file named E:/Projects/test_cb_debugging/main.cpp. but the debugger also complains if debugging is working. As far as I have seen this happens with all projects I switched to use qtworkbench  :(

I checked the compiler command and it looks ok (e.g. debugging is enabled -g). If this problem is reproducible I'll be glad to help to figure out whats wrong...

cheers
  Chriss
Title: Re: QtWorkbench plugin
Post by: yop on October 23, 2007, 01:31:39 pm
Thanks for your feedback. Since there is a new release coming up I will test the main features of QtWorkbench so I will let you know if I can see any problems.
Title: Re: QtWorkbench plugin
Post by: gghelli on October 31, 2007, 02:48:20 pm
I'm trying to use an external library in win32 but I'm not able to specify it in the qmake makefile, if I add it to LIBS but the plugin discards it and puts it into OBJECTS_DIR, which is not what I want.
How can I link with other libraries?
Thank you

Gianluca
Title: Re: QtWorkbench plugin
Post by: yop on November 01, 2007, 08:54:35 am
Add it in your project's external libraries:
Project->Build Options->Linker tab

For whatever can be inputed through a codeblocks option (that is not Qt specific) you have to use the respective C::B functionality.
Title: Re: QtWorkbench plugin
Post by: Squonk on November 02, 2007, 05:26:06 pm
Hi,

I am trying to use Code::Blocks for writing Qt applications under Windows.

I have Qt-4.3.2 (OpenSource, MingW) working from the command line : I am able to compile and run the "Hello World' application using "qmake -project", "qmake" and "make".

I installed the latest available Code::Blocks nightly build (SVN 4564 from October 26th) : it is working fine.

However, I downloaded the latest (0.5.1_alpha) QtWorkbench binairy plugin, and when I tried to install it, I get a warning:
"One or more plugins were not installed successfully:
C:\Documents and Settings\Mikeul\Mes Documents\Downloads\QtWorkbench-0.5.1_alpha.cbplugin"

Here is what I get in the logs:
[17:52:33.984]: Initializing plugins...
[17:53:12.359]: ERROR: SDK version mismatch for QtWorkbench (1.11.11). Expecting 1.11.12
[17:53:12.390]: Failed

Any idea what's wrong?

Michel
Title: Re: QtWorkbench plugin
Post by: yop on November 30, 2007, 04:20:42 pm
Yes I do: http://code.google.com/p/qtworkbench/issues/detail?id=9

This is expected for binary releases while there is no stable C::B SDK. When releasing new versions you will get one that works with the current (at the time) nightly build. I can't guarantee that it will work with *any* nightly build. The stable C::B release (when it comes) will be supported properly.
Title: Re: QtWorkbench plugin
Post by: Quentin on December 13, 2007, 05:46:39 pm
I cannot install QTWOrkBench in my CodeBlocks ,Then QTworkbench is 0.51Alpha and Codeblocks svn is 4719 ,when i select plugins->manage plugins->install new ,after montine the message show install not success?Why?
Title: Re: QtWorkbench plugin
Post by: yop on December 14, 2007, 09:31:30 am
The binary plugin is outdated. Current work is under svn in http://qtworkbench.googlecode.com/svn/branches/0.6/
I am trying to allocate some time to polish, update the documentation and release it. As I have posted earlier, binary plugin releases can become outdated due to core C::B changes. I know this is inconvenient but we 'll have to wait for a stable C::B release for a beta release.
Title: Re: QtWorkbench plugin
Post by: Tipoun on January 30, 2008, 11:31:35 pm
Hi,

I compiled the last version of plugin for the nightly build. But it doesn't work...
Can you help me please ?

Regards
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on January 31, 2008, 08:30:25 am
I compiled the last version of plugin for the nightly build. But it doesn't work...
Try removing "TIXML_USE_STL" from the compiler options (it's a define). This switch is obsolete for a long time now. Don't forget to re-build the plugin afterwards. Not build, but re-build.
Title: Re: QtWorkbench plugin
Post by: yop on January 31, 2008, 09:41:14 am
I 'll change that also in svn.
Title: Re: QtWorkbench plugin
Post by: Tipoun on January 31, 2008, 12:41:29 pm
I compiled the last version of plugin for the nightly build. But it doesn't work...
Try removing "TIXML_USE_STL" from the compiler options (it's a define). This switch is obsolete for a long time now. Don't forget to re-build the plugin afterwards. Not build, but re-build.
It doesn't work too... CodeBlocks doesn't arrive to load the dll.
Title: Re: QtWorkbench plugin
Post by: yop on February 19, 2008, 01:44:57 pm
A new version is available 0.6.0 alpha. A binary release for windows is available. I 'm working on the linux source tarball.

Home page and change log:
http://code.google.com/p/qtworkbench/

Documentation:
http://code.google.com/p/qtworkbench/wiki/PluginUsage

Binary windows release:
http://code.google.com/p/qtworkbench/downloads/detail?name=QtWorkbench-0.6.0_alpha.cbplugin
Title: Re: QtWorkbench plugin
Post by: Revvy on March 08, 2008, 04:17:43 am
I really like how this plugin is working so well, but I have one problem after following the wiki pages.  My project gets this error when I try to build:

make.exe: *** No rule to make target `..\..\Qt\4.3.3\mkspecs\default\qmake.conf', needed by `Makefile.Debug'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings
Title: Re: QtWorkbench plugin
Post by: noisy.pl on March 11, 2008, 12:24:48 am
I have problem with this plugin too...but I use new CB8.02.

I am wondering when will be released plugin to new CB...
Title: Re: QtWorkbench plugin
Post by: yop on March 11, 2008, 04:05:48 pm
I really like how this plugin is working so well, but I have one problem after following the wiki pages.  My project gets this error when I try to build:

make.exe: *** No rule to make target `..\..\Qt\4.3.3\mkspecs\default\qmake.conf', needed by `Makefile.Debug'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings

Can you prepare a minimal project that reproduces this issue and upload it in the bug tracker?

I have problem with this plugin too...but I use new CB8.02.

I am wondering when will be released plugin to new CB...

Shortly ;-)
Title: Re: QtWorkbench plugin
Post by: adfm on March 19, 2008, 09:06:59 pm
Hello all,

I'm starting some work on windows and decided to do with QT on Code::Blocks. I have QT 4.3.4 fully installed and along with CB 8.02 and QtWorkbench 0.6.0.

I worked with QT3 a couple of years ago and I liked the experience but I am having a hard time with QT4. QtWokbench seemed to provide some relief, but I even by following the steps in the wiki I can't get no project file created :S

Anyhow, I don't know if it's off topic or not, but how can I start a project from scratch using QtWorkbench. Just add a main.cpp and a .ui and have it generate the .h and .cpp of the .ui files. (given the .pro file).

I'm asking this because I don't like the idea of coding all of the user interface and if I can use designer and bypass using uic and even better.

Can I do that?

Sorry about the newbie question, but I'm getting ready to go Darth-Vader on my PC  :shock:

cheers

Title: Re: QtWorkbench plugin
Post by: yop on March 20, 2008, 09:06:50 am
Have you checked the documentation? (http://code.google.com/p/qtworkbench/wiki/PluginUsage)
I guess the most interesting part for you would be: http://code.google.com/p/qtworkbench/wiki/QtWorkbenchProjects

Hope this helps...
Title: Re: QtWorkbench plugin
Post by: GeeF on March 20, 2008, 05:03:27 pm
Hidiho,
first of all, I wanna thank you yop for your efforts. The Plugin works quite well for me now, although I had a bit of a hassle.(next time, read wiki first ^^)
Anyway, couldn't we just add a new project template which sets all the configs we need for workbench? Would ease up the process for Qt and c::b beginners. Also, if it's possible, it would be nice if the generated ui_*.h and moc_*.h could be added automatically.

oh, last but not least. I've got a little bug. I'm on a resolution of 1280x1024 and when I try to access the qtworkbench tab in the project properties, it won't fit the standard window size of the dialog, i.e. it doesn't resize that well ^^ So I almost crawled up the wall wondering where to activate the plugin, because the damn checkbox wasn't visible. I'm on c::b release 8.02. Don't know if this is a bug or an easter feature ^^

Apart from that, the Plugin really rocks. Keep up the good work.
Title: Re: QtWorkbench plugin
Post by: schroeder on March 21, 2008, 11:01:31 am
Well... I've stumbled upon this while looking for some advice about why the QT4 tutorial's examples compile nicely under C::B until you get to the damn example #7: at which point, apparently because for the first time C::B sees a secondary .cpp module and a header, it starts complaining about an "undefined reference to 'vtable for LCDRange'[/i]" - BTW, as long as I can see from a quick Google search, already a very notorious issue - and the nice fairy tale suddenly ends with the wolf growling ;^)

Anyway, I have a question: under C::B there already seems to be a "File > New > Project > QT4 project" option, which is actually the one I've used. So, why another plugin to obtain what apparently should be the same effect? Or, dually: if the need has been felt of implementing a new QT4 plugin, what does that default functionality, "File > New > Project > QT4 project", serve for?

Second point: is there any possibility of successfully compiling a QT4 application using the default
Codeblock's wizard option?

Thanx :°)
Title: Re: QtWorkbench plugin
Post by: GeeF on March 21, 2008, 07:39:13 pm
Quote
So, why another plugin to obtain what apparently should be the same effect? Or, dually: if the need has been felt of implementing a new QT4 plugin, what does that default functionality, "File > New > Project > QT4 project", serve for?

Second point: is there any possibility of successfully compiling a QT4 application using the default
Codeblock's wizard option?

The default QT4 Project wizard just makes shure you have qt installed and if needed, asks you for its location. Nothing more, except for creating a nice little hello qt app with its main.cpp.
If you wanna use the unique features Qt provides, ie. signals and slots, you have to run the files through the moc and if you're using the designer, you have to uic the .ui files first and import all those, or simply use qmake for the whole build process.
Qtworkbench does all that for you, so you can compile inside of codeblocks without having to hassle with the build tools.
Title: Re: QtWorkbench plugin
Post by: schroeder on March 22, 2008, 12:13:44 am
Quote
The default QT4 Project wizard just makes shure you have qt installed and if needed, asks you for its location. Nothing more, except for creating a nice little hello qt app with its main.cpp. If you wanna use the unique features Qt provides, ie. signals and slots, you have to run the files through the moc and if you're using the designer, you have to uic the .ui files first and import all those, or simply use qmake for the whole build process. Qtworkbench does all that for you, so you can compile inside of codeblocks without having to hassle with the build tools.

...ah-ha, I get it. I wonder if the last 0.6.0-alpha works also with the 8.02 release ^_^

Anyway: is there any place where this point, about the wizard's default behavior, is made clear? I can't see any. So, I'd suggest that some more information, maybe even just a simple brief note, will be added in future releases. Something like "please: don't expect this wizard to help you create a true QT4 project. It's simply intended to help you make the fine tuning of your C::B in function of your QT installation, provided you have one". Actually, I think that from a wizard one tends to expect (maybe erroneously, yes... but, that's it) sort of a "plug and play" behavior...

As an alternative, I'd suggest that, should the plugin show to work reliably and to be without major bugs, its functionalities be included in the next release of C::B by default...

Am I wrong? ;^)
Title: Re: QtWorkbench plugin
Post by: yop on March 28, 2008, 11:07:54 am
Hi, thanks for your support and interest.
Providing a template for creating QtWorkbench projects is on my TODO list (actually it is ready) but unfortunately:
Anyway this is something that I have on my mind so you 'll eventually get it :-)

The Qt4 project template that is bundled with C::B is insufficient for creating a full blown Qt application and cannot be considered useful. GeeF already mentioned the reasons.

ui_*.h and moc_*.h files have no reason for being included in your project files as they are automatically generated. C::B provides facilities for performing custom compilation steps per file type and include them in your project files in order to participate to the build process. I haven't checked that yet but it seems that this could be another solution for building Qt projects and probably more "native" to the C::B build process. I think that if someone checks it out (http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system) and proposes things Yiannis will be more than happy to take a look at them. This facility was originally meant for adding support for non C++ files to the build process but it can evolve I guess.
Title: Re: QtWorkbench plugin
Post by: mandrav on March 28, 2008, 03:04:08 pm
ui_*.h and moc_*.h files have no reason for being included in your project files as they are automatically generated. C::B provides facilities for performing custom compilation steps per file type and include them in your project files in order to participate to the build process. I haven't checked that yet but it seems that this could be another solution for building Qt projects and probably more "native" to the C::B build process. I think that if someone checks it out (http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system) and proposes things Yiannis will be more than happy to take a look at them. This facility was originally meant for adding support for non C++ files to the build process but it can evolve I guess.

Yes, it will improve. Its current major drawback is that these settings are compiler-global, (i.e. you must manually configure your C::B installation for these) while they should be per-project/target settings.
Title: Re: QtWorkbench plugin
Post by: Omni on April 06, 2008, 03:12:36 am
The Code::Blocks project file of the qtWorkbench plugin doesn't correctly use the global variable "cb"
the search paths have the form

$(#cb)/include
$(#cb)/include/wxscintilla/include

but should look like this for greater compatibility

$(#cb.include)
$(#cb.include)/wxscintilla/include

Title: Re: QtWorkbench plugin
Post by: Revvy on April 06, 2008, 06:53:39 pm
I really like how this plugin is working so well, but I have one problem after following the wiki pages.  My project gets this error when I try to build:

make.exe: *** No rule to make target `..\..\Qt\4.3.3\mkspecs\default\qmake.conf', needed by `Makefile.Debug'.  Stop.
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings

Can you prepare a minimal project that reproduces this issue and upload it in the bug tracker?

Done.
Title: Re: QtWorkbench plugin
Post by: yop on April 07, 2008, 01:58:21 pm
Done.
Thanks

The Code::Blocks project file of the qtWorkbench plugin doesn't correctly use the global variable "cb"
the search paths have the form

$(#cb)/include
$(#cb)/include/wxscintilla/include

but should look like this for greater compatibility

$(#cb.include)
$(#cb.include)/wxscintilla/include

Thanks I 'll prepare that
Title: Re: QtWorkbench plugin
Post by: noisy.pl on April 22, 2008, 08:55:04 pm
...
I have problem with this plugin too...but I use new CB8.02.

I am wondering when will be released plugin to new CB...

Shortly ;-)

its mean?
Title: Re: QtWorkbench plugin
Post by: yop on April 23, 2008, 09:31:16 am
Current version works happily with cb 8.02
Title: Re: QtWorkbench plugin
Post by: dandy on April 30, 2008, 04:59:12 pm
Hello,
It's probably something silly but after following the instructions in Google-wiki, I still can't build the example complexdialog project.

Error message:
    "Execution of 'make.exe -f Makefile complexwizard' in 'C:\Cpp\dialogs' failed."

I'm using:
Code::Blocks 8.02 (Windows)
QtWorkbench-0.6.0_alpha.cbplugin
qt4.3.4

Any ideas?

Thanks!
Title: Re: QtWorkbench plugin
Post by: wildcart on May 01, 2008, 08:55:05 pm
Hi...

I have a small problem using qtworkbench on windows (codeblocks is setup to use mingw). When I add additional libraries to my project and then compile the project, the compilation breaks complaining that the libraries could not be found. The reason is that for some reason the '\' in the path is not replaced by a '/'. This is done for all other paths when qmake creates the Makefile based on the .pro file. Since qmake creates the 'faulty' Makefile, I am not really sure if this i a bug in qmake or qtworkbench. I am using qt-4.3.1 at the moment.

How to reproduce:
Project->build options->Search directories->linker
add a directories containing some dll
Project->build options->Linker settings
add some DLL base name.
OR
Porject->build options->Linker settings
add static library with absolute / relative path

Parts of my .pro file:
Code: [Select]
LIBS += -L"E:\programs\devel\GnuWin32\bin" -L"E:\programs\lib\FTGL-2.1.2\win32_vcpp\Build" -lfreetype6 -lftgl_dynamic_MT
INCLUDEPATH += E:\programs\lib\FTGL-2.1.2\include E:\programs\devel\GnuWin32\include E:\programs\devel\GnuWin32\include\freetype2

Parts of the resulting Makefile:
Code: [Select]
INCPATH       = -I'e:/programs/lib/qt/4.3.1/include/QtCore' -I'e:/programs/lib/qt/4.3.1/include/QtCore' -I'e:/programs/lib/qt/4.3.1/include/QtGui' -I'e:/programs/lib/qt/4.3.1/include/QtGui' -I'e:/programs/lib/qt/4.3.1/include/QtOpenGL' -I'e:/programs/lib/qt/4.3.1/include/QtOpenGL' -I'e:/programs/lib/qt/4.3.1/include/QtXml' -I'e:/programs/lib/qt/4.3.1/include/QtXml' -I'e:/programs/lib/qt/4.3.1/include' -I'e:/programs/lib/FTGL-2.1.2/include' -I'e:/programs/devel/GnuWin32/include' -I'e:/programs/devel/GnuWin32/include/freetype2' -I'e:/programs/lib/qt/4.3.1/include/ActiveQt' -I'debug' -I'.' -I'e:/programs/lib/qt/4.3.1/mkspecs/default'
LIBS        =        -L'e:/programs/lib/qt/4.3.1/lib' -lopengl32 -lglu32 -lgdi32 -luser32 -LE:\programs\devel\GnuWin32\bin -LE:\programs\lib\FTGL-2.1.2\win32_vcpp\Build -lfreetype6 -lftgl_dynamic_MT -lQtXmld4 -lQtOpenGLd4 -lQtGuid4 -lQtCored4

Only the paths I added to 'Project build options->Search directories->Linker' (LIBS) are not converted from '\' to '/'. Paths I added to 'Search directories->Compiler' (INCLUDEPATH) are converted.


When I edit the makefile by hand, replacing all '\' by '/', and then call make from the command line (cmd.exe) it works. In the .pro file all paths contain '\' while in the Makefile all paths are converted to '/'. For some reason this is not done for a paths in the LIBS variable. qmake doesn't touch those paths at all, if I write '/' in the .pro file then it will be '/' in the Makefile, also. At the moment, it looks like a bug in qmake. On the other hand I didn't really looked at how qmake's is supposed to treat '/' vs. '\'.


I fixed this problem by hacking 'qtwprogenerator.cpp:425'. Instead of using UnixFilename(wxString) to replace the separator according to the platform (*nix/windows), I added the following lines:
Code: [Select]
wxString out = opts[x];
out.Replace(_T("\\"), _T("/"), true);


Other than this, version 0.6 of qtworkbench is working great...
 

thnx
  Chriss
Title: Re: QtWorkbench plugin
Post by: rododox on May 07, 2008, 09:51:14 pm
Hi!

Today i have decided to add this plugin to codeblocks (i'm using 8.02 with winXP)

but the "Qt Workbench" tab in the "Project->Properties" are disabled and i can't choose any option from it!!!

Is it a bug :evil:? or i just dont know how to use the plugin? :oops:
Title: Re: QtWorkbench plugin
Post by: yop on May 07, 2008, 10:58:17 pm
@rododox Resize the window, some options are hidden (it's a bug). Check the "Using QtWorkbench" check box and you 'll be ready to go.

@wildcart I 've added this: http://code.google.com/p/qtworkbench/issues/detail?id=13

@dandy Try from the command line. Maybe make.exe is not in your path?
Title: Re: QtWorkbench plugin
Post by: wildcart on May 14, 2008, 07:39:06 pm
Hi,

I tried to use code::blocks' global variables in my windows project, adding $(#var.include) to 'Build Options -> Search Directories -> ...'.  When I try to compile the project I get the following error:
Code: [Select]
Makefile.ASDViewer.Release:15: *** unterminated variable reference.  Stop.

So the question is: Does qtworkbench support code::blocks global variables?


Some more information:
In qmake's project file the variables are not resolved instead the include line looks like this:
Code: [Select]
INCLUDEPATH += E:\MinGW\include $(#ft.include) $(#ft.include)\freetyp2 $(#ftgl.include)

and the offending line in the created Makefile is (line breaks are inserted for readability), note the -I"$(":
Code: [Select]
INCPATH       = -I"..\..\..\lib\QT\4.4.0\include\QtCore"
-I"..\..\..\lib\QT\4.4.0\include\QtCore"
-I"..\..\..\lib\QT\4.4.0\include\QtGui"
-I"..\..\..\lib\QT\4.4.0\include\QtGui"
-I"..\..\..\lib\QT\4.4.0\include\QtOpenGL"
-I"..\..\..\lib\QT\4.4.0\include\QtOpenGL"
-I"..\..\..\lib\QT\4.4.0\include\QtXml"
-I"..\..\..\lib\QT\4.4.0\include\QtXml"
-I"..\..\..\lib\QT\4.4.0\include"
-I"..\..\..\MinGW\include"
-I"$("
-I"e:\lib\QT\4.4.0\include\ActiveQt"
-I"..\asdviewer\obj"
-I"..\asdviewer\obj"
-I"..\..\..\lib\QT\4.4.0\mkspecs\default"



Two more things:
1) If global variables are not yet supported I can try to take a look at it.
2) Is this the right place to ask these questions or should I go to
Quote
http://code.google.com/p/qtworkbench/issues/list

regards
  Chriss
Title: Re: QtWorkbench plugin
Post by: RT200 on October 12, 2008, 10:36:47 am
Looks like this plugin has been orphaned :(  Is there anyone who can maintain it?
Title: Re: QtWorkbench plugin
Post by: yop on October 13, 2008, 11:40:18 am
It's not orphaned. It's just not in my immediate priorities. In any case if someone wants to step in he 's more than welcome :-)
Title: Re: QtWorkbench plugin
Post by: RT200 on October 13, 2008, 10:03:10 pm
I was worring about potential problems - what if some changes in C::B broke this plugins? But since you still keep eye on it is ok ;)

P.S. Thx for QtWorkBench, it makes my life more easy.
Title: Re: QtWorkbench plugin
Post by: RT200 on December 06, 2008, 07:47:20 pm
QtWorkbench 0.6 does not working with Code::Blocks r5325 on my Debian Lenny.  After installation plugin does not appears in "Manage plugins" dialog. Can anyone confirm this problem?

P.S. I'll try compile few others revisions and check this plugin on WinXP, but it will take some time.
P.P.S. Code::Blocks was complied from source on Debian Lenny using WxWidgets 2.8.7 (with unicode support enabled). I compile it using control files from debian directory running command "debuild". QtWorkbench was compiled from installed Code::Blocks r5325.

UPD: QtWorkbench works fine with Code::Blocks r5322 (last night build) on WinXP
UPD2: When installing plugin error message appears in concole: "(codeblocks:6372): Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed"
Title: Re: QtWorkbench plugin
Post by: RT200 on December 10, 2008, 09:11:23 am
Sorry for panic, Code::Blocks was linked with wrong libraries, Now all works fine  :oops:
Title: Re: QtWorkbench plugin
Post by: ChiPnGo on February 13, 2009, 04:39:33 pm
Hi
I tried to use QtWorkbench plugin from svn (0.6.0a). Simple copied QtWorkbench.zip and libQtWorkbench.so (compiled from qtworkbench-linux.cbp) to cb directories and it appeared in "installed plugins". But after selecting project properties it crashes.
Is it a right way to install plugin?
Ubuntu 8.10 x64, cb 8.02 (via apt-get).

upd
binaries, mb?
Title: Re: QtWorkbench plugin
Post by: critic on April 23, 2009, 02:29:06 pm
Please fix the following bugs:

If I have only release version of Qt I can't build debug target of project, but why? This can be walked around using traditional libs' paths and libs options

You can use sources and ideas that presented at http://forums.codeblocks.org/index.php/topic,10453.msg71877.html#msg71877
Title: Re: QtWorkbench plugin
Post by: critic on May 15, 2009, 06:08:07 am
I work on windows XP using C::B nightlies.
Where I can get last svn snapshot of this plugin?
Last release of plugin is not working properly (problems with saving settings when closing config dialog, enable checkbox is hided at bottom of the config dialog and much more)


Some requests of improving old and adding new features

It will be better if you make applying of settings without closing the project.

Please, add button 'Browse' to value editor in advanced view (to enter file system paths)

It will be good if plugin offer to change path to relative (as in C::B project build options dialog)

Can you save Qt project settings in cbp-file? It will be better to keep in mind only one project file (pro-file can be generated before starting make)

Some additional information can be found at http://forums.codeblocks.org/index.php/topic,2253.msg71882.html#msg71882
Title: Re: QtWorkbench plugin
Post by: yop on May 15, 2009, 09:30:16 am
!!!Are you all died!!!?

I don't see how this can help... Anyway thank you for the interest I am still alive and well.

Your suggestions are clear. The plugin is developed in my spare time and was heavily developed while I needed it. Right now I 'm not using it full time so development is stalled. I started working on some things a few weeks ago but again my day job engagements didn't let me wrap it up. When and if I find some time I will provide the updates and you will all be notified. I understand your frustration and I apologize but this is the best answer I give you at the moment.
Title: Re: QtWorkbench plugin
Post by: MortenMacFly on July 07, 2009, 02:28:18 pm
I don't see how this can help... Anyway thank you for the interest I am still alive and well.
If you find the time: I have fixed two serious null pointer issues that happen if you do single file compilation and have it's root in this plugin. Find the patch attached...

[attachment deleted by admin]
Title: Re: QtWorkbench plugin
Post by: yop on July 13, 2009, 02:01:00 pm
It doesn't seem that there will be any time left in my spare time to update the plugin any time soon. I have converted the repository to Mercurial so anyone interested can fork it easily.

From http://code.google.com/p/qtworkbench/ :

The plugin supports the now (Jul '09) latest official C::B release 8.02. The plugin will not be further maintained and the source code repository has been converted to Mercurial enabling the easiest available option for forking to anyone interested in picking it up. Thanks for all the fish.