Sunday, February 11, 2007

wxWidgets Wizard Update: 11th Feb 07

Latest changes are:
  • Library selection page in Linux have been redesigned. Options have been regrouped (See the screenshot below).

  • Now it's possible for users to create a project with default wx lib configurations present in Linux.


Regrouped Options in Windows

Regrouped Options in Linux

Regrouped Options in Linux

Please download Code::Blocks Nightly Revision 3577 onwards to get these changes.

Tuesday, February 06, 2007

wxWidgets Wizard Update: 6th Feb 07

There are a number of changes made to it last week.

Changes:

  • Bugfix restoring PCH support for GCC. A bug was introduced in Revision 7 which disabled the PCH support.
  • Warning message added for Empty Project Creation.
  • Added option to use customised PCH header.
  • Grouped the various options in wxWidgets lib Configuration page.

The changes will be available with Revision 3570 of Code::Blocks (http://www.codeblocks.org) and onwards.

Wednesday, January 31, 2007

It’s Official Now!

You may be aware that I was working on improving the old wxWidgets Project wizard. I had released the 7th revision of the new wizard on 29th January 2007.

Now the Code::Blocks development team has merged the 7th revision with their latest Nightly Release (Released on 30th January 2007). That means now you don’t have to manually install it.

Any further revisions / modifications will be merged to the main repository directly. So there won’t be any code release through my blog. But you’ll be kept up-to-date on the changes made.

If you are using any old Nightly Build of Code::Blocks, then I would request you to upgrade to 30th January 2007 Nightly or Onwards to get the benefit of latest wxWidgets Project Wizard. Nightly builds are available from the following forum.

http://forums.codeblocks.org/index.php?board=20.0

Have a nice experience with Code::Blocks.

Tuesday, January 30, 2007

Revision 7 of Modified wxWidgets Project Wizard of Code::Blocks

Revision 7 of wxWidgets project wizard of Code::Blocks is released.

Changes:

  • Creation of Empty Project is now possible.
  • Wizard now generates customised header/source files. Filenames are generated on the basis of project name.
  • Wizard now accepts Author name, email and website to customise header/source files generated by the wizard.
  • Wizard now generates resource file in Windows. Default wx icon is used. XP theme support is also enabled using wx.rc file.
  • Wizard now remembers following preferences.
    • wxWidgets configuration settings
    • Author details

Free Image Hosting
Screenshot showing option to create empty project in Windows


Free Image Hosting
Screenshot showing option to create empty project in Linux

Free Image Hosting
Screenshot showing Author Details Page



Known Issues:
  • Resource file is not customised now and available only in Windows.
  • Does not remember additional wx lib selection (Work is in progress).

Download it from:http://biplab.quotaless.com/wxwidgets_wizard_Rev7.zip

A detailed discussion on this topic can be found in Code::Blocks forum (http://forums.codeblocks.org/index.php?topic=4768.0). Please post your feedback and suggestions in Code::Blocks forum.

Monday, January 22, 2007

Revision 6 of Modified wxWidgets Project Wizard of Code::Blocks

Revision 6 of wxWidgets Project wizard is now available. This revision comes with several new features.

Changes:

  • Added support (partial) for Linux and Mac (Untested). It's now possible to select different wxWidgets version present in Linux system.
  • Added option to select Static/Dynamic, ANSI/Unicode build of wxWidgets in Linux.
  • Added option to select Application Target Type in Windows (For Advanced users only)
  • Wizard now checks the presence of wx configuration, selected for project, precisely in Windows. Expect almost No false warning.
  • Couple of minor fixes and code clean-up.


New options available in Linux


Check the Highlighted option to change target type


Change Target Type here, but be cautious.

Tested in:

  • OpenSUSE 10.2 with GCC 4.1.2, wxGTK-2.6.3 & 2.8.0 Dynamic-(Debug/Release)-Unicode-Monolithic build of lib.

Known Issues:

  • Does not check the presence of wxWidgets lib in Linux system. So be careful to select correct lib configuration otherwise the generated project will fail to compile.
  • Checked with Monolithic builds in Linux; it may give you trouble if you are using non-monolithic builds in Linux.

Important Note:
Please be careful while changing Target Type. For GCC there shouldn't be any problem. But with BCC you'll have to manually change some compiler settings otherwise it won't link.

The new features may come with Gift of Hidden Bugs. Please share that gift once you get that. Wink Download the latest release from the following link.

http://biplab.quotaless.com/wxwidgets_wizard_Rev6.zip

Also please post your comments, feedbacks.

Hope you'd enjoy this new release. Very Happy

Saturday, January 20, 2007

How to Install New wxWidgets Project Wizard in Code::Blocks?

I have been posting the Modified wxWidgets Project wizard for the past couple of weeks. But there seems to be one missing point. How to install them? The installation details are already in the forum. Still I'm posting them for your convenience so that you do not need to scroll through the entire thread. The follwing procedure is applicable for Windows only.

First, download a Nightly Build of Code::Blocks from the following forum. Read the latest post and download the latest Nightly using the link provided in that post.

http://forums.codeblocks.org/index.php?board=20.0

Now download two more files from the following link.

wxWidgets Runtime DLL

MinGW Runtime

Now extract all the files to a folder, e.g. C:\CodeBlocks

Run the codeblocks.exe to launch Code::Blocks IDE.

To Install the Modified wxWidgets Project Wizard, please follow the following steps. Download the latest revision of project wizard from the following post.

wxWidgets Project Wizard - Revision 7

You'll find that the zip file contains a folder named wxwidgets which contains some file. Now extract the folder to following location {Code::Blocks Dir}\share\CodeBlocks\templates\wizard folder and overwrite the existing wxwidgets folder and files inside that. If you wish you may keep a backup of existing folder.

That's it. You have now successfully installed new wizard.

Please remember that it is a Development Release and there might be bugs.

Wednesday, January 17, 2007

Revision 5 of Modified wxWidgets Project Wizard of Code::Blocks

Here comes the Revision 5 of the modified wizard. Only one new feature has been added.

Changes:
  • Supports Microsoft Visual C++ 7.1 Compiler.

  • PCH support is activated for MSVC 7.1 compiler.
Few Important Notes:
  • Wizard assumes that Multi-threaded Dynamic C and C++ Runtimes are being used. If you are using wx lib statically linked with C Runtime Library (CRT) you should make couple of changes in the libraries added. I'll discuss it later in this post.

  • Wizard generated projects will fail during linking if it doesn't find msvcprt[d].lib

I've tested the wizard for MSVC 7.1 with wxPack. I've found that static libraries are statically linked with CRT. That may generate the following error if you are using this wizard with wxPack's static libs.
wxbase28d.lib(baselib_datetime.obj) : error LNK2001: unresolved external symbol _timezone
OLDNAMES.lib(timezone.obj) : error LNK2001: unresolved external symbol _timezone
OLDNAMES.lib(timezone.obj) : error LNK2001: unresolved external symbol __timezone
To solve this, do the following; Go to Project & Build Options menu, then go to Linker tab. Remove msvcrt[d].lib from Linker Libraries section and add libcmt[d].lib. Also remove /NODEFAULTLIB:libcmt[d].lib from Linker Options section.

Please download the wizard files from the following link.

http://biplab.quotaless.com/wxwidgets_wizard_Rev5.zip

If your installation does not have msvcprt[d].lib then visit the following websites to get more details on how to create it.

http://www.delta3d.org/article.php?story=20050721180227305&mod
http://root.cern.ch/root/Procedure/Procedure%20to%20install%20the%20free%20Microsoft%20Visual%20C.htm

Enjoy Coding!

Friday, January 12, 2007

Revision 4 of Modified wxWidgets Project Wizard of Code::Blocks

Here is another upgrade. This has some important fixes. So if you are using older revision, please download and use this revision.

Changes:
  • Wizard now sets Appropriate wxWidgets lib order. But do not forget to add any necessary additional wx libs (Jpeg, Tiff, Expat or Regex) if you are using advanced lib (RichText, AUI, etc); wizard will not add them. Thanks to three_minute_hero for pointing this.
  • Now XML and XRC lib can be selected separately.
  • Wizard now stops compilation of wx_pch.h in Non-PCH project builds (This is a temporary fix, needs Improvement). Thanks to Ryan for pointing this.
  • Wizard supports BCC 5.82 Compiler. You can now build wx app with it.

Known Issues:
  • Does not support MSVC 7.1 or 6.
  • PCH support needs improvement.

Some Informations:

BCC 5.82 Compiler: This compiler comes with Turbo C++ Explorer edition. Get it for free from (http://www.turboexplorer.com/cpp). To add the compiler to Code::Blocks, see my video tutorial.

wx lib order: Only 3 libraries are vulnerable to lib orders; RichText, DB_Grid and XRC. Their additional dependencies (partial) are -
  • DB_Grid - wxbase_odbc, wxmsw_adv
  • RichText - wxbase_xml, wxmsw_adv, wxmsw_html
  • XRC - wxbase_xml, wxmsw_adv, wxmsw_html

By the way, you may also need to add JPEG, TIFF, Expat and Regex libraries if you add them. Sorry I could not find out their complete dependency chart. If you have the complete dependency chart, you can post it here. Very Happy

Please visit the following link to download the new wizard.

http://forums.codeblocks.org/index.php?topic=4768.msg38437#msg38437

Enjoy Coding. Very Happy

Tuesday, January 09, 2007

Add Turbo C++ Explorer’s Compiler to Code::Blocks

Code::Blocks is a nice cross-platform IDE which supports quite a large number of compilers across different platforms. But not all the compilers are supported officially. If you wish to add a new compiler to Code::Blocks, then go through this interactive tutorial.

In this case, I'll be showing you how to integrate Borland C++ Compiler 5.82 (BCC 5.82) with Code::Blocks. This compiler is shipped with Turbo C++ Explorer edition (Please visit http://www.turboexplorer.com/cpp). Turbo C++ Explorer comes with a Great IDE. Question may arise if it has a great IDE then what is the point of integrating with Code::Blocks?

There are couple of reasons

1. Code::Blocks comes with a large number of project templates. By adding this compiler and tweaking few settings you can compile a variety of applications easily with BCC 5.82.
2. You can use the development release of wxWidgets Project Wizard (See my previous posts for more details) and Code::Blocks to develop application with wxWidgets using BCC 5.82 compiler. I've tested it and it works without any hitch.

BCC 5.82 comes with a lot of improvements and it's blazingly fast. So if you wish to upgrade your Code::Blocks projects to the New, Advanced compiler this tutorial will be very helpful. This tutorial will also be helpful if you wish to add any other compiler to Code::Blocks. The procedure will be similar.

Please remember that if you wish to develop VCL based application, then Turbo Explorer IDE would be the appropriate choice.

Visit the following url for the tutorial. It is best viewed with resolutions 800x600 or above.

Please note that the video is hosted in a free webhost. So please be patient as the file downloads.

http://biplab.quotaless.com/BCC_582.htm

Hope you'll enjoy the tutorial.


Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.

Friday, January 05, 2007

Another Update of wxWidgets Project Wizard for Code::Blocks

Another update has been uploaded to the Code::Blocks forum. This release has couple of fixes and new features.

Changes:
  • Supports Pre-compiled headers for BCC 5.5.1 and MSVC 8.
  • Wizard CPP files have been modified to support PCH.
  • "Use the debugging libraries" option have been disabled in Windows part. This option is no longer necessary (See screenshot below).
  • DECLARE_EVENT_TABLE(); in main.h file has been changed to DECLARE_EVENT_TABLE() This is necessary to avoid error while compiling with BCC.
  • msvcrt.lib has been added as /NODEFAULTLIB in Debug target of MSVC 8 to avoid warning messages in some cases.



Please Remember that PCH works well only when you have a large number of static headers to include and your project CPP files have consistent header declaration. So if you have fairly large project written in wxWidgets, you'll notice a Huge decrease in build time.

But improper use may increase Build time if the headers are not consistent. Regeneration of PCH will increase the build time .

Known Issues:
  • PCH support does not work with MSVC 6 or 7.1
  • wx_pch.h file is included in the CPP files and also force included in case of GCC and MSVC. I have kept the force include option as some devs want this to remain. To support Borland, wx_pch.h have been added to CPP files itself. In future this option will be modifed as per CB devs and other users decision.

To download the required files, please visit the following url,

http://forums.codeblocks.org/index.php?topic=4768.msg37945#msg37945

You have to login in order to download them.

Enjoy the new release.

Tuesday, January 02, 2007

Modified wxWidgets Project Wizard of Code::Blocks

wxWidgets (http://www.wxwidgets.org) is a Cross-platform GUI Toolkit in C++. It is very similar to MFC. It supports several compilers in different platforms. Also wxWidgets can be compiled in different builds, e.g. Static, Dynamic, Unicode, Monolithic, etc. Beginners often finds it difficult to compile their first application properly.

Code::Blocks (http://www.codeblocks.org) is a Free, cross-platform IDE written in wxWidgets. The best part of this IDE is that it supports a host of compilers in defferent platforms. It runs in Windows and Linux. The look-and-feel and the power remains same. If you're coding C, C++ and never tried this, I would recommend this to try.

The wxWidgets project wizard of Code::Blocks works well with GCC and MSVC 6, but only Unicode Monolithic build of wxWidgets. The MSVC 8 support was lacking. I started this work as I could not compile my application with Code::Blocks properly with MSVC 8. The existing code has been heavily modified and a lot of new features have been added to the wizard.

New Features:
  • Option to select wxWidgets 2.6.3 or wxWidgets 2.8.0 version libraries (See screenshot below).

  • Supports static, dynamic, ANSI, Unicode, Monolithic builds of both versions of wxWidgets.

  • Option to add additional libraries of wxWidgets if the user is not working with Monolithic build (See screenshot below).

  • Added support to MSVC 8 and Borland C++ 5.5.1 compilers.

  • Additional compiler flags have been added for MSVC 8. Checks are in place to ensure that they don't come up with MSVC 6 or 7.1

  • Debug target now generates Win32 GUI app instead of Console mode app. It also links against Debug build of wxWidgets.