views:

148

answers:

3

I've been trying to build some huge projects in BCB5 for some time now. I want to use the command line tools because it would cut build time by more than 50% (it already takes 4 hours in the IDE). Often, projects will build just fine in the IDE but fail miserably in the command line. I did some digging and discovered this nice little comment in a header file:

__published:    // IDE-managed Components

Is this saying that the components that follow can only be built with the IDE open? Please tell me there is a way around this. BCB5 is starting to make me depressed.

Extra info:

Make.exe gives a pile of errors claiming ambiguity between the header file and an imported file. I''m pretty sure the header file is supposed to be referencing the imported file though, rather than comparing with it.

In the header file:

#include <ComCtrls.hpp>

ComCtrls.hpp has the variable TTreeNode.

Error from make:

[exec] Error E2015 .\TMain.h 876: Ambiguity between 'TTreeNode' and 'Comctrls::TTreeNode'
A: 

Have you tried installing the C++ Compiler Enhancements plugin, by Andreas Hausladen, which improves the compilation speed. I would also recommend installing the DelphiSpeedUp plugin.

I think you need to export the project as makefile, to compile from the command line, because C++Builder 5 project files are XML. Have a look at this article, from the C++Builder Developer's Journal.

If none of the above fails try the official C++Builder Forum.

stukelly
I have the enhancement plugin, but it is not reliable. It occasionally causes BCB to crash and some projects will not compile with the patch (there are some variable naming issues). Also, I am already compiling from a make file. The problem is the reference to IDE activex components.
Everett
You may want to try the official C++Builder forum, https://forums.codegear.com/category.jspa?categoryID=8
stukelly
A: 

I've more or less given up on the BCB5 command line tools. It appears that they are fundamentally broken.

I did, however, manage to find a nice open source tool, ProjectMaker, that uses the command line tools effectively. You can find it here: http://projectmaker.jomitech.com.

ProjectMaker fixes up a few of the problems with BPR2MAK, but it's not perfect. Most project build perfectly with ProjectMaker, some still require the IDE. It's not a perfect solution, but it does alright.

Everett
Command line builds work fine in C++Builder 2007 and up, since both the IDE and the command line use the same build system, MSBuild.
Moritz Beutel
+1  A: 

__published: // IDE-managed Components Is this saying that the components that follow can only be built with the IDE open? Please tell me there is a way around this. BCB5 is starting to make me depressed.

No, this does not mean that you can only build the source in the IDE. It just means that this section is automatically populated by the IDE (the form designer)

While there are good third party solutions (as mentioned by the others) C++Builder 2007 and above made huge improvements in the build system. IDE build times are very similar to command line builds and the MSBuild integration now makes it possible to be sure that the same parameters are passed to the command line tools as are used by the IDE.

David Dean - Embarcadero