Board index » cppbuilder » How to get an project with many dfm-units working?

How to get an project with many dfm-units working?


2004-10-25 04:01:21 PM
cppbuilder81
Hello,
since BCB5 doesn't compile projects with more than 130 units, I was told to
split my projects into libs. But libraries cannot contain ressources and
therefore no dfms. Does that mean my project is limited to 130 forms/frames?
I could add the library's source path to the exe-project's library paths so
that the linker will find the dfms anyway, but this can't be the only way
possible! Is there a clean way to solve this?
Thanks...
David
 
 

Re:How to get an project with many dfm-units working?

David Scheffel wrote:
Quote
since BCB5 doesn't compile projects with more than 130 units,
Well that simply is not true. Why do you say so? I looked in
one of my bcb5 projects. It has 263 units from wich 77 are forms.
Quote
I was told to
split my projects into libs. But libraries cannot contain ressources and
therefore no dfms.
...
Quote
Does that mean my project is limited to 130 forms/frames?
Aha. Now suddenly that are 130 forms. I cannot comment on that.
What are the errors that occur ?
Quote
I could add the library's source path to the exe-project's library paths so
that the linker will find the dfms anyway, but this can't be the only way
possible! Is there a clean way to solve this?
Don't know. But why is this not a clean way ?
HAns.
 

Re:How to get an project with many dfm-units working?

Quote
>since BCB5 doesn't compile projects with more than 130 units,

Well that simply is not true. Why do you say so? I looked in
one of my bcb5 projects. It has 263 units from wich 77 are forms.
In projects with>130 the linker frequently runs into an [linker error]
access violation. This bug has been fixed in the BCB6 linker a couple of
months ago.
Quote
>Does that mean my project is limited to 130 forms/frames?

Aha. Now suddenly that are 130 forms. I cannot comment on that.
What are the errors that occur ?
See obove. For the linker it doesn't matter wheter the units are forms or
not. But it sounds like you don't have these problems in your project? Are
all the units part of just one single project?
Quote
>I could add the library's source path to the exe-project's library paths
>so that the linker will find the dfms anyway, but this can't be the only
>way possible! Is there a clean way to solve this?

Don't know. But why is this not a clean way ?
Because it's "recommend" to have only the lib-folders in the library paths.
An alternative could be to copy the dfm files to the \lib directory.
By the way. Which version of bcb are you using?
 

{smallsort}

Re:How to get an project with many dfm-units working?

David Scheffel wrote:
Quote
>>since BCB5 doesn't compile projects with more than 130 units,
>
>Well that simply is not true. Why do you say so? I looked in
>one of my bcb5 projects. It has 263 units from wich 77 are forms.
Are
all the units part of just one single project?
That is what I said yes.
Quote
By the way. Which version of bcb are you using?
5. Otherwise I had not reacted on your statement.
Hans.
 

Re:How to get an project with many dfm-units working?

hans galema wrote:
Quote
>By the way. Which version of bcb are you using?

5. Otherwise I had not reacted on your statement.
By the way: bcb3 handles that too.
Hans.
 

Re:How to get an project with many dfm-units working?

Quote
>>>since BCB5 doesn't compile projects with more than 130 units,
>>
>>Well that simply is not true. Why do you say so? I looked in
>>one of my bcb5 projects. It has 263 units from wich 77 are forms.

>Are all the units part of just one single project?

That is what I said yes.
Interesting. Are you using the default precompiled headers in the project
options ($(BCB)\lib\vcl50.csm)? Or did you altered each unit like this
(recommendation in bcbdev.com article):
//---------------------------------------------------------------------------
#include <vcl.h>
#include <pch.h>// <-- this file defines the headers which should be
precompiled; should reduce compile time
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
Maybe this practise increases the number of problems with the bcb compiler /
linker. How many time does an complete build of your project take?
 

Re:How to get an project with many dfm-units working?

David Scheffel wrote:
Quote
#include <vcl.h>
#include <pch.h>// <-- this file defines the headers which should be
precompiled; should reduce compile time
Yes. I use pch.h with most of the units.
Quote
Maybe this practise increases the number of problems with the bcb compiler /
linker. How many time does an complete build of your project take?
About a minute.
Hans.
 

Re:How to get an project with many dfm-units working?

"hans galema" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
David Scheffel wrote:

>#include <vcl.h>
>#include <pch.h>// <-- this file defines the headers which should be
>precompiled; should reduce compile time

Yes. I use pch.h with most of the units.
So this can't be the source of the problems then.
Quote
>Maybe this practise increases the number of problems with the bcb
>compiler / linker. How many time does an complete build of your project
>take?

About a minute.
Wow. That's not bad. With just an single project an complete build of my
project takes up to 6 min.! Well, it was much faster before including all
the huge DevExpress components.
But even after restructering into libs an build still takes up to 2 min. for
all projects (about 150 units). About 70 units are forms and frames. But the
count might rise quickly when creating some "wizards". Each one has up to 20
units. That's why I'm trying to make things right this time.
By the way will you continue using C++Builder, anyway? I've really liked
BCB, but now that I have to accept that BCB has some serious bugs I really
worry about go an working with BCB - likely without support in the future.
Well, actually I don't have the ressources to port my project to another
environment either.
regards
David
 

Re:How to get an project with many dfm-units working?

David Scheffel wrote:
Quote
>About a minute.

Wow. That's not bad. With just an single project an complete build of my
project takes up to 6 min.! Well, it was much faster before including all
the huge DevExpress components.
It depends on the hardware of the computer. I was astonished that it
took only a minute. On my Pentium III 500MHz with 196 MB ram bcb5 was
unusable with this project.
Now this was on a Pentium M 1,7GHhz 512 MB ram. A good buy.
Quote
By the way will you continue using C++Builder, anyway? I've really liked
BCB, but now that I have to accept that BCB has some serious bugs I really
worry about go an working with BCB - likely without support in the future.
I see no reason that I can not use bcb5 even if there is no
support for bcb6 or further development for it. Until now I could
do all with bcb3.
For new projects I've to decide yet.
Hans.