News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

QtWorkbench plugin

Started by yop, February 04, 2006, 11:53:35 PM

Previous topic - Next topic

yop

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?
Life would be so much easier if we could just look at the source code.

briahn06

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?

MortenMacFly

Quote from: briahn06 on April 09, 2006, 09:13:52 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

yop

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)).
Life would be so much easier if we could just look at the source code.

MortenMacFly

Quote from: yop on April 09, 2006, 12:11:43 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

lgarrido

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

briahn06

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?

MortenMacFly

Quote from: briahn06 on April 09, 2006, 08:00:06 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

briahn06

#23
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.

yop

#24
@ 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 ;)
Life would be so much easier if we could just look at the source code.

lgarrido

yop: I opened qtworkbench-linux.cbp

yop

Quote from: lgarrido on April 10, 2006, 10:04:13 AM
cp -r devel/testCodeBlocks/QtWorkbench/out/share /usr/
This is where the rest of the codeblocks plugins' shared files are installed?
Life would be so much easier if we could just look at the source code.

lgarrido

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


squizzz

this space is for rent

lgarrido

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.