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 800×600 or above.

Download it from:

http://files.filefront.com/BCC_582_Tutorial7z/;7074765;;/fileinfo.html

Hope you’ll enjoy the tutorial.


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

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.

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.

Continue reading