IDE setup - Borland

From WxWiki
Jump to: navigation, search

BuilderX

See BuilderX.

Borland C++ Builder 5

See Using wxWidgets with Borland CPP Builder 5.

TurboC

Prebuilt wxWidgets Library for Turbo C++/BDS 2006 / CodeGear RadStudio 2007 is available in CodePaks - http://codepaks.sf.net. The CodePak automatically adds the wx include and lib path in the IDE. It also installs a Project Template that can be used to kick-start wxWidgets development.

Borland Free Commandline Compiler

How to compile a large program with BCC with a debug version of wxWidgets

There is an upper limit on the size of a standalone-executable that can be linked by Borland's ILINK32 linker. When your app is small (about under 2.5megs total) it can be linked in with both the debug and non-debug builds of the library. However, beyond that, you will find that the linker won't be able to link the program together in a debug library (will still work in the non-debug library though). To link your big program to the debug library, do these steps:

  • Clean and rebuild the wxWidgets library in debug mode, as a DLL
$ cd /wx/msw/src
$ make makefile.b32 clean
$ make makefile.b32 DLL=1
  • Build any contrib libraries, such as the XML resource library, using the wx DLL and building a DLL (Note: there won't be a XRC dll anywhere, the wxxrc.lib will be correct though:
$ cd /wx/contrib/src/xrc
$ make -f makefile.b32 clean
$ make -f makefile.b32 WXUSINGDLL=1 WXBUILDDLL=1
  • Build your application:
$ cd to your application's directory
$ make -f makefile.b32 WXUSINGDLL=1

You now have a executable of your program. Note that at runtime, it will look for 2 DLLs:

  • wx.dll (the wxWidgets debug library that you built, located in wx/lib/)
  • cc3250mt.dll [the BCC runtime, which can be found in your Borland/bcc55/bin directory].

For running your app, both these DLLs need to be either somewhere in the searched path, or in the same directory as your executable. Distributing with the DLLs in the same directory as the executable makes for easier distribution, since your wx.dll may be different from other people's wx.dll.

Proper use of pragma hdrstop directive

In your headers for the .cpp files of a project, every single file should have the same included files above the hdrstop pragma. Borland can use cached headers to vastly decrease compile time, but it will only work if every file uses the same thing above the hdrstop pragma. Put all the headers that are only required for that particular .cpp file after the pragma hdrstop