C++Builder project file(s)

This is the forum to discuss the Journal's content, article suggestions, etc.

Moderator: 2ffat

Post Reply
S0mbre
Active Poster
Active Poster
Posts: 11
Joined: Wed Jun 08, 2011 9:36 pm

C++Builder project file(s)

Post by S0mbre »

Time and again I have to manually edit my *.cbproj files - chiefly to eliminate unwanted libraries and runtime packages. I am positive I'm not alone here, eh what? So I think it would be great if anyone here undertook to write an article about the structure of BCB project files (preferably, for all BCB versions). Personally, I am confused about the difference between 'LinkPackageStatics' and 'AllPackageLibs'... also it's not quite clear to me what values the 'Condition' attribute in the 'PropertyGroup' nodes can take, etc. etc.

Anyone for it? :)
HsiaLin
BCBJ Master
BCBJ Master
Posts: 332
Joined: Sun Jul 08, 2007 6:29 pm

Re: C++Builder project file(s)

Post by HsiaLin »

I agree, i recently got XE6 and its causing all kinds of issues due to the changes in project files.
rlebeau
BCBJ Author
BCBJ Author
Posts: 1715
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA
Contact:

Re: C++Builder project file(s)

Post by rlebeau »

I take it that you have not disabled all installed packages by default and edited the default project template to remove all package references? That way, you start with a clean project each time. Each project should contain references to only the packages that you have enabled and use for that specific project. A classic mistake is to leave everything enabled by default, that is what ends up causing the IDE to add so many unused references to every project.
Remy Lebeau (TeamB)
Lebeau Software
HsiaLin
BCBJ Master
BCBJ Master
Posts: 332
Joined: Sun Jul 08, 2007 6:29 pm

Re: C++Builder project file(s)

Post by HsiaLin »

Would be nice if they had something similar to a project editor/viewer/converter where changes could be made more easily. For instance, most of my projects were from the 2009 version and theres so much different now that i have to make a new project and save it and just add the old forms to it. Same with a lot of component packages although most of those do still work fine if they are simple components.

And what is the logic behind them making default new projects include dynamic RTL and links to packages? Sure it will make a smaller exe but it wont run anywhere but the pc it was made on unless you include a load of libraries.
User avatar
2ffat
Forum Mod
Forum Mod
Posts: 449
Joined: Wed Jun 23, 2004 7:07 am
Location: South Hill, VA
Contact:

Re: C++Builder project file(s)

Post by 2ffat »

And what is the logic behind them making default new projects include dynamic RTL and links to packages? Sure it will make a smaller exe but it wont run anywhere but the pc it was made on unless you include a load of libraries.
AFAIK, that's been the case since BCB 3 (1998). Take a look at these articles: Using packages in C++Builder 3 and Building stand-alone EXEs.

When I build my program for release, I always uncheck the dynamic RTL and packages to make it a stand-alone program. I do agree that it would be nice for an article or two on the new compilers and how to "upgrade" old programs written on older compilers.
James P. Cottingham

Look at me still talking
when there is science to do.
HsiaLin
BCBJ Master
BCBJ Master
Posts: 332
Joined: Sun Jul 08, 2007 6:29 pm

Re: C++Builder project file(s)

Post by HsiaLin »

Thanks 2ffat, yes i know how to make standalone exe, we need a way to edit the default project file, i do think thats where the problems come from.
gambit47 wrote:I take it that you have not disabled all installed packages by default and edited the default project template to remove all package references? That way, you start with a clean project each time.
Do you have a link to an article or other information on how to do that?
rlebeau
BCBJ Author
BCBJ Author
Posts: 1715
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA
Contact:

Re: C++Builder project file(s)

Post by rlebeau »

HsiaLin wrote:most of my projects were from the 2009 version and theres so much different now that i have to make a new project and save it and just add the old forms to it.
That is what you are supposed to do anyway whenever you upgrade to a newer IDE version. You cannot just open an old project in a newer IDE version and expect it to work as-is, that has never worked.
HsiaLin wrote:And what is the logic behind them making default new projects include dynamic RTL and links to packages?
That has always been the default for as long as I can remember.
Remy Lebeau (TeamB)
Lebeau Software
HsiaLin
BCBJ Master
BCBJ Master
Posts: 332
Joined: Sun Jul 08, 2007 6:29 pm

Re: C++Builder project file(s)

Post by HsiaLin »

gambit47 wrote: That is what you are supposed to do anyway whenever you upgrade to a newer IDE version. You cannot just open an old project in a newer IDE version and expect it to work as-is, that has never worked.
If thats the case it should tell you that you need to do that instead of saying its upgrading a project.
rlebeau
BCBJ Author
BCBJ Author
Posts: 1715
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA
Contact:

Re: C++Builder project file(s)

Post by rlebeau »

HsiaLin wrote:If thats the case it should tell you that you need to do that instead of saying its upgrading a project.
The IDE does *attempt* to upgrade the project. That has always been true. But the upgrade *rarely* ever works correctly, which is why you should not rely on it. The IDE may restructure the project, convert from MAKEFILE to XML, etc, But it has never been smart enough to update outdated/redundant package references, for instance.
Remy Lebeau (TeamB)
Lebeau Software
Post Reply