News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Can't use wxFormBuilder with Code::Blocks

Started by passerby, July 27, 2008, 05:31:46 PM

Previous topic - Next topic

passerby

I have installed Code::Blocks and wxFormBuilder
Then started a new project and selected wxFormBuilder for GUI tool.
The new project wizard finished fine, but I don't see a way to use wxFormBuilder (unlike wxSMith, but I'd like to use wxFB).

How can I make Code:Blocksr recognize the installed wxFormBuilder?

Sorry for the probably dumb question, I am pretty new to all this.

Running Ubuntu Hardy Heron under VirtualBox on PCLinuxOS.

MortenMacFly

Quote from: passerby on July 27, 2008, 05:31:46 PM
The new project wizard finished fine, but I don't see a way to use wxFormBuilder
wxFormBuilder is a stand-alone application that cannot be integrated into C::B directly (as wxSmith which is a plugin). You need to run it as an external application (and may continue editing the code with C::B).
You may want to add wxFormBuilder as a tool in the tools menu of C::B. this way you can easily launch it from within C::B and within the right folder and with the right options.
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]

passerby

Thanks for the tip.

After a long pause I am having another go at it.
I added wxFormBuilder as a tool as suggested, and created a new dialog-based project.
Running the new project brings up the dialog with 'Welcome to wxWidgets'.
Double-clicking on WxWizDialog.fbp in the Others folder within Code::Blocks starts up wxFormBuilder.
As a timid test, I re-wrote the message text to 'Hiho' in wxFormBuilder, then saved.
Returned to C::B, rebuilt, and ran the program -- and it STILL displays the original message.

What am I doing wrong?

alb_cb_moon

You need not only "saved the project" , select "Generate Code" option too
OS: Windows XP SP2
GUI Library: wxWidgets 2.8.10
IDE: CodeBlocks SVN / Nigth Builds Compiler: MinGW & gcc 3.4.5

passerby

#4
alb_cb_moon,
Thank you, but I still have a problem...
This is a wxWidgets project that starts with an auto-generated code.
wxFormBuilder said it needed to convert the code. Accepting that, generating the code, saving, and trying to build in Code::Blocks now produces a build error:
'wxMessageBox' was not declared in this scope'
I reinstalled everything as described at http://wxpack.sourceforge.net/Tutorials/CodeBlocks, but still get the same error.

Edit: Sorry, didn't generate inherited class... Works fine now.
Thanks for helping.

jonas thomas

Quote from: MortenMacFly on August 11, 2008, 03:27:53 PM
You may want to add wxFormBuilder as a tool in the tools menu of C::B. this way you can easily launch it from within C::B and within the right folder and with the right options.
Please forgive this newbie question.
What is considered good practice for configuring wxformbuilder  as a user defined tool within Code::blocks for within either Linux or XP? (I plan to be doing both)
This seems to work in Linux, but at this point I'm not even claiming to know what I'm doing.
Are these considered to be the "right options"? :?