C++ Compiler Enhancements 2.79

No further development.

C++ Compiler Enhancements (bcc32pch) is a plugin for BDS/TurboPro 2006 and C++Builder 2007 that improves the compilation and code insight speed of the IDE. This is achieved by the usage of advanced precompiled headers and optimizations in the IDE<->Compiler interop code. Furthermore the tool allows you to do the compilation and linking in a separate process what gives you real background compilation. The own make system improves the speed of the “Make project” action, too. It also compiles pascal files first so the generated .hpp headers are available when the .cpp files are compiled. For a more detailed feature list see the Features section.

bcc32pch only speeds up the compiler/code insight. If you want to speed up the load-time of the IDE and the general speed of the IDE, you could additionally install DelphiSpeedUp that also works for BCB and BDS.

Requirements:

  • Windows 2000 or newer
  • C++Builder 2006 or higher (C++Builder 5 and 6 are not officially supported anymore)

Fearures:

  • Advanced precompiled header support (*)
  • Real background compilation (Compiler and Linker run in their own processes)
  • Own make system that is faster than MSBuild and allows the compile progress dialog to show more exact information
  • Speed improvement, also improves IDE Compiler’s speed
  • Speed improvement for Make Project dependency check (especially for huge projects)
  • Compiles .pas files first so the .hpp files exist when the C++ code is compiled.
  • Full message pane support with extended error information
  • Can use a detailed message window to show the console output of the commandline tools
  • Shows how many files are already compiled
  • Shows a progress bar that indicates the compile progress
  • Adds Shift+F9 as shortcut for Build project if no other shortcut was assigned
  • Makes “Run Without Debugging” visible (BCB 6 only)
  • Force Run functionality (no dependency check and compilation, but debugging)
  • Load Process functionality allows to debug external applications (BCB 5/6 only)
  • Global include directories for IDE and replacement compiler
  • External Linker (ilink32.exe) can be used for IDE compilation (BCB 5/6 only)
  • Execute foreign makefiles (MAKE, NMAKE, GNUmake) with errors/warnings in the message pane and the possibilty to debug the generated application (requires bcc32 compilation)
  • Allows to execute programs before and after the compilation
  • Pre-Build, Post-Build, Pre-Link support for C++Builder 2006 and newer
  • CodeGuard support
  • Support for C++Builder 2006/2007’s local options for .cpp files
  • Include and project file precaching
  • Allows to overwrite the used library files for each project
  • bcc32pch Makefile export (BCB 5/6 and C++Builder 2006, C++Builder 2007 with disabled MSBuild)
  • External compilation with unsaved files
  • CodeInsight errors can be shown in the message pane and the IDE’s titlebar is used to indicate that CodeInsight is parsing the code.
  • Easier Build Configuration switching in BDS 2006 (new menu item Project/Active Build Configuration)
  • IDE Compiler shows the filename when it could not create the file (original only says that a file could not be created)
  • Bugfix for BDS 2006 QC #24380 “IOTADebuggerServices.CreateProcess raises access violation”
  • Bugfix for BDS 2006 QC #24513 “IOTAFormEditor.Modified returns True for opened formulars”
  • C++Builder 2006 workaround for C++ Compiler buffer overflow for -Ixxx, -Dxxx and -Uxx parameters.

*: The plugin allows to inject a header file into all .cpp files during compilation. In this header file you can include the headers that should be precompiled.
The #pragma hdrstop is inserted below the injected include file.

Installation:

  • Download the plugin
  • Extract the zip file to a directory of your choice.
  • Execute the contained installer.
  • Start C++Builder and work on your projects.

Download:

Name IDE Version File Size Downloads Added
C++ Compiler Enhancements 2.79 C++ 5-2007 bcc32pch279Setup.zip 802.79 KB 9869 times 2008-10-02

Using the advanced precompiled header support

Steps:

  • Open the Project menu and click on the “Create PCH file ( _pch.h)” menu item.
  • Add the include preprocessor statements for all files that should be precompiled.
  • Close the file
  • Compile the project

Things you should know

  • If you rename your project the PCH file will be automatically renamed.
  • With the menu item “Delete PCH file ( _pch.h)” you can disable the advanced PCH support.
  • You can change the default content of the PCH file in the bcc32pch configure dialog.
  • All “#pragma hdrstop” in your code will be ignored because the bcc32ide.exe tool injects an hdrstop statement after including the PCH file. This only happens if there is a PCH file.

PCH file in non-IDE projects

For non-IDE projects you can use the commandline tool IDE Compiler bcc32ide.exe which is also used by the IDE plugin. This tool expects the same parameters as bcc32. In order to specify the PCH file it has another parameter -pch="filename". For a “makefile project” you can simply replace the bcc32 by bcc32ide -pch="project_pch.h" and create a project_pch.h file containing all includes you want to have precompiled.

bcc32ide - IDE Compiler with advanced precompiled header support

Additional options:

  -pch=       Use PCH file (ignores -H= by default)
  -pchH=      Use  as PCH output file
  -pchH                 Use -H= as PCH output file
  -pchI       Force include this file into the PCH header file
  -FI         Force include this file (usage like -I)
  -verbose              Display file progress
  -automake             Compile only modified files
  -autolib=  Creates a .lib file with all compiled .obj files

Changlog:

  • 2008-04-10 (Version 2.79)
    • Fixed: Sometimes the global C++ Include directories were not added to the -I command line parameter
    • Fixed: Package libs were used in applications without packages
    • Fixed: Macros in the final output directory caused bcc32pch to create a directory with %macroname%
    • Added: Workaround for malformed resource compiler additional options from wxForms. (BCB 2007)
  • 2008-03-06 (Version 2.78)
    • Added: Workaround for a brcc32.exe bug
    • Fixed: ilink32 was called without the package lib files
  • 2008-02-24 (Version 2.77)
    • Added: C++Builder 2007 support (with full support for local options)
    • Fixed: Compile Dialog and Detailed Message Dialog do not try to stay on top anymore
  • 2007-03-18 (Version 2.75)
    • Fixed: Compiler interface was not correct
    • Fixed: BCB 5/6 could not use precompiled headers when the $(BCB) macro was used in the filename
    • Fixed: The external compiler used wrong library files for console application in BDS 2006
    • Fixed: Parameters in “Execute after …” were wrong. The application name was inserted as first parameter.
    • Fixed: “Execute after …” was executed even if you compiled one file (Alt+F9)
    • Fixed: bcc32pch couldn’t handle UNC paths
    • Fixed: User defined bcc32.exe and ilink32.exe failed if they where quoted.
    • Fixed: empty “-l” parameter was specified under BCB 5/6 when the Bpi/Lib output directory was empty
    • Fixed: Multimonitor support for the compile progress dialog (not for BCB 5)
    • Fixed: The “Abort” button has not worked when local project file options were used
    • Fixed: Compiler initialization took very long under BDS 2006
    • Fixed: BCB 5 incompatible properties are history (workaround for BCB 5)
    • Fixed: The BMAKE compilation failed if the make.exe filename in the make settings dialog was quoted
    • Fixed: ALLOBJ in bcc32pch makefiles were not adjusted to the $(OBJOUTDIR) macro
    • Fixed: After the compilation the main form was always activated instead of the window that had the focus before the compilation.
    • Fixed: Fixed access violation that occured when bcc32pch and DDevExtensions were loaded
    • Fixed: Renaming the project file caused an exception when a bcc32pch file exists
    • Added: Progressbar for dependency checks.
  • 2007-01-01 (Version 2.7)
    • Added: Support for BDS 2006’s Local source file options for .cpp files
    • Added: BDS 2006 Pre-Build, Post-Build, Pre-Link support
    • Added: CodeGuard support
    • Added: File precaching
    • Added: BDS 2006 ProjectManager/Popupmenu/Compile invokes the replacement compiler
    • Added: New tree-configuration dialog
    • Added: Project specific bcc32 and ilink32 replacements
    • Added: “Overwrite Library files” to the “Bcc32pch Project Options” dialog
    • Added: “Execute Makefile” uses ComboBoxes instead of Edits
    • Added: BCB5/6 and 2006 use same BorlandMAKE files (generated by bcc32pch without bpr2mak)
    • Added: tasm32 console output parser
    • Added: Project option to disable the replacement compiler for a specific project.
    • Added: Another speed improvement
    • Added: -B and -S support for bcc32ide.
    • Added: The “Clean Project” dialog has a new button “Clean Target” that deletes the target exe and tds files.
    • Replaced BPL by a DLL expert
    • Changed: The internal Make system is now the only make system in the global options
    • Removed: Removed “Add build VersionInfo” options because it has no functionality anymore
    • Removed: “Source modified. Rebuild?” feature has been moved to the DDevExtensions 1.3 plugin
    • Removed: UCS-4 support for Delphi source files (is now part of DDevExtensions 1.3)
    • Removed: Windows 9x is no longer supported
    • Refactored and partly rewritten the code
    • Fixed: Files that are opened in BDS 2006 lost special chars like German umlaut.
    • Fixed: linked projects could not use ADO
    • Fixed: ilink32ide.exe had problems with binary DFM files.
    • Fixed: tlib in BCB 5 meight have been called with wrong parameters.
    • Fixed: Commandline tools are now called with exactly the same parameters in the same order like the IDE calls the internal tools
    • Fixed: Quotes in BorlandMAKE file generator
    • Fixed: unintended quotes for tlib target filename in InternalMake MakeTool
    • Fixed: InternalMake had not checked for modified static libraries and DFM files
    • Fixed: Disabling “Dynamic RTL linking” in Linker options still linked to borlndmm.dll
    • Fixed: .dcr files are now linked into the target
    • Fixed: “Increment build version” had not worked in BDS 2006.
    • Fixed: Linker errors were not treated as errors
    • Fixed: “Compile unit” compiled files that are not part of the project
    • Fixed: Replacement compilation made the IDE acting instable.
    • Fixed: Exceptions during compilation caused a “Commandline tool returned errorcode” message
    • Fixed: Replacement IDE Linker is disabled by default
    • Fixed: Build version was increased even if “Auto increment build number” was switched off
    • Fixed: Linking failed for BCB to BDS imported projects (bug in BDS’s BCB importer)
    • Fixed: Unsaved projects now use in-memory resource file
    • Fixed: Compile dialog and Detailed Message dialog now stay behind modal dialogs
    • Fixed: Hooking code is replaced by the newer DDevExtensions hooking code
    • Fixed: With activated “Use IDE Linker” an invalid parameter was given to the user defined linker
    • Fixed: Linking failed if the project’s bpi/lib and the environment’s bpi/lib output directories were both empty.
    • Fixed: User defined compiler and linker were double quoted.
    • Fixed: Saving non-persistent files after compiling the project was not possible
    • Fixed: ForceDirectories could have been called with an empty string
    • Fixed: Linking failed if the output directories contained slashes instead of backslashes
    • Fixed: Installer used BDS default global include directories for BCB
    • Fixed: bcc32pch was loaded when no C++Builder BDS personality was loaded
    • Fixed: tasm32 assembling was not working
    • Fixed: Resource file compilation ignored include directories and defines.
    • Fixed: *.tlb files weren’t linked into the binary file.
    • Fixed: Environment variables were not resolved for the target output directory.
    • Fixed: When compiling a non-active project, the active project was compiled instead of the other project.
    • Fixed: IDE Compiler Speedfix without replacement compiler could not be used with background compilation.
    • Fixed: Linking failed if a library path or the target directory contained a plus char (“+”).
    • Fixed: A static lib without any *.obj file failed to compile.
    • Fixed: Compiling pascal files failed in C++ projects that use C++ only packages (BorlandMAKE)
    • Fixed: There was an access Violation when BCB 6 forgot that it had a project group.
  • not released (Version 2.6), only development snapshots
    • Changed: “Compile unit” does a build instead of a make
    • Fixed: “Ask for modified files” had not worked for .dfm and .res files
    • Fixed: bcc32ide.exe ignored errors and returned exitcode 0 to make.exe
    • Fixed: Packages are now compiled to the final output directory if set
    • Fixed: Compile/DetailedMessage dialogs stay in background if BCB is not the foreground window.
    • Fixed: bcc32ide.exe deletes the .obj file if the compilation fails (sync with IDE behaviour)
    • Fixed: Headerfile caching causes “invalid char” errors if the file was open in the editor (BCB aborts reading if the buffer is larger than 16Kb)
    • Fixed: Empty error messages in the message pane (status-protocol changed)
    • Fixed: Ctrl+C had not worked for bcc32ide.exe.
    • Improved: Step and Run to Cursor automatically close the compile dialog.
    • Improved: bcc32ide.exe -automake is a lot faster
    • New: Speed improvement for “Make Project” dependency check (especially for huge projects)
    • New: FastCode project code for general speed improvement
    • New: AdvPCH support for built-in compiler rewritten (also works for BCB 2006)
    • New: “First file creates PCH, other files use PCH” mode. This improves compile speed for normal PCH usage (PCH option must be set to “create and use”)
    • New: Ignore standard header dependency check (all header files under $(BCB)\Include)
    • New: Write Cache for built-in compiler
    • New: ProjectManager’s popup menu commands are now hooked
    • New: Built-in Compile Progress Form shows number of compiled files and progress bar
    • New: bcc32ide.exe supports BCB 2006
    • New: UCS2 and UCS4 support for BCB 2006 built-in compiler / bcc32ide.exe
    • New: Global include directory for built-in and replacement compiler
    • New: CodeInsight errors can be shown in the message pane
    • New: CodeInsight compile progress can be shown in the main form’s caption bar
    • New: External Linker (ilink32.exe) can be used for built-in compilation (has no effect on BDS 2006 as it already uses the external linker)
    • New: External compilation with unsaved files (2000/XP only, via DLL-injection), modified files are saved to $(PROJECTDIR)\.bcc32pch_unsavedmapping
    • New: Optimized filename hashing
    • New: BDS 2006 replacement compiler
    • New: IDE Compiler shows the filename when it could not create the file (original only says that a file could not be created)
    • New: Own build system (ProjectMaker, default)
    • New: bcc32pch is now an expert. This increases stability. (no unloading after executing BeforeCompiler and reloading before AfterCompile which causes access violations).
    • New: BDS 2006 Makefile export
    • New: Easier Build Configuration switching in BDS 2006 (new menu item “Project/Active Build Configuration”)
    • New: Bugfix for BDS 2006 QC #24380 “IOTADebuggerServices.CreateProcess raises access violation”
    • New: Bugfix for BDS 2006 QC #24513 “IOTAFormEditor.Modified returns True for opened formulars”
    • New: BDS 2006 workaround for C++ Compiler buffer overflow for -Ixxx, -Dxxx and -Uxx parameters.
    • New: bcc32ide.exe outputs the number of compiled lines. “%d lines in %d files compiled in %.2f seconds”.
    • New: “Show Log” button on the compile progress dialog adds the console output to the message pane.
    • New: The replacement compiler can use the IDE Linker through ilink32ide.exe
    • New: Better console output parsing.
    • New: MessageBeep after compilation depending on IDE’s option.
    • New: Commandline tool LibExportRemover.exe that removes all dll-exported symbols in .lib files (can be used to decrease the number of exported symbol on static linked BPLs)
    • New: BCB mainform caption shows compile time.
    • New: BCB Personal SKU support.
    • New: IDE Compiler enhancements can be disabled. Disabling both the Replacement Compiler and the IDE Compiler enhancements disables bcc32pch
    • New: BDS 2006 project dependency check and compilation
  • 2005-12-14 (Version 2.55)
    • Fixed “Compile unit” object output directory.
    • Fixed “Compile unit” make.exe error message when pressing Alt+F9 for the project.bpf file. This file is now ignored.
    • Workaround for the “command line too long” bug of make.exe. Gets it’s own minimial environment block.
    • Fixed BCB 5 bcc32pch package unload bug / BCB quit without saving bug
    • Build/Make all does not require user interaction when switching to the next project (Project Managers’ popup menu still requires user interaction)
  • 2005-12-08 (Version 2.5)
    • Automatically jumps to the first error
    • Build project shortcut is only set if there is no shortcut set (keeps GExperts shortcut working)
    • “Export Bcc32Pch Makefile…” menu item added and original “Export Makefile…” exports the BCB’s makefile again
    • “Clean Project” allows to “clean” (*.obj + pch) and “distclean” (*.obj + pch + .exe + .tds) the project
    • Better support for NMAKE and MSVC. Errors are added to the message view.
    • compiled lines output
    • Compile dialog shows currently compiled header file name (optional)
    • bcc32’s buffered console output is now unbuffered what updates the compile dialogs more frequently
    • bcc32pch uses the IDE Compiler (no further bcc32.exe compiler assertions)
    • The header injection is done in memory.
    • Fixed “Project in IDE open?” bug when switching between built-in and bcc32pch compiler
    • Fixed PCH file spreading when intermediate output is empty. The PCH file is created in the project directory when no .obj output directory is specified
    • Compile dialog does not steal focus
    • Compile dialog said “Finished” when the compilation was not successfull but no compiler error message was found
    • mtbcc32 support
    • Fixed $(RELEASE) macro bug for pre and post compiling program execution
    • PCH support for built-in compiler
    • IDE compiler speed improvement fix
    • Warnings and Errors also point line’s column.
    • Replaced bcc32pch.exe by bcc32ide.exe
  • 2005-11-13 (Version 2.1):
    • Support for captured tlib.exe (console capture bug)
    • Fixed quote-parsing bug in bcc32pch.exe
    • bcc32pch.exe fixes the \” escape sequence bug that make.exe generates for the -n$(@D) parameter
    • Fixed ProjectNotifier-IDE-termination bug
    • -R$(INCLUDEPATH) and -I$(INCLUDEPATH) are added to the .pas.obj and .pas.hpp makefile rules
    • For non-executables the /B ilink32 parameter is replaced by reloc-table keeping /b
    • Projects’s build version is now updated instead of the additional “Build” version info entry
    • “Export Makefile” menu item is hooked and generates the fixed makefile
    • Added “execute before compile”, “execute after make/build” and “execute after build” options
    • Execute Foreign Makefile within the IDE and get errors and warnings in the message pane (NMAKE and GNUmake are supported)
    • Redesigned detailed message dialog and compile progress dialog
    • Detailed message form saves it’s position and size if WindowState=wsNormal
    • Tools are executed in an own thread
    • Added menu item “Run/Run Process…” starts an external application with integrated debugging
    • Qt4 qmake support (creating Qt4 applications), requires additional compiler support for Qt 4
  • 2005-11-09:
    • Fixed LIBPATH quote problem.
    • Changes in LIBFILES lead now to relinking (bpr2mak.exe bug)
    • Added new “Build” version info entry that replaces the IDE’s system where I haven’t found a working solution yet.
    • Fixed wrong parameter list of the TProjectUpdater/TPackageUpdater.DoCompile() hook
  • 2005-11-04:
    • Rewritten quote-path code.
    • Secured against BCB5 ToolsAPI bug (GetModuleFileEditor sometimes crashes).
    • Makefiles are regenerated after a bcc32pch version change
    • Compiler message dialog shows up after compilation finished (if auto-close is deactivated)
  • 2005-09-23: Added support for Packages containing .pas files. Fixed some minor bugs.
  • 2005-09-16: Added “Auto close” option to configuration dialog. Fixed escape sequence \” bug.
  • 2005-09-14:
    • Fixed endless loop in splitting -I command line option.
    • Errors without a filename in the message are now recognized as errors.
    • Added bcc32.exe replacement option.
    • Secured plugin unload code.
    • Message/Compile dialog auto closes when starting the application.
    • bcc32pch can show the bcc32’s command line.
  • 2005-09-11: Fixed file extensions issue. Autodependency is cached. Improved file modification check.
  • 2005-09-09: Improved support for paths with spaces (C:\Program Files\Borland\CBuilder6\Bin).
  • 2005-09-08: Alternative make.exe possible, auto-dependency cache, force run, BCB5 support.
  • 2005-09-07: Added Package compilation support, bcc32pch.exe supports response files.
  • 2005-09-01: Fix for spaces in BCB directory name.