BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

#pragma link bloat...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Roddy Pratt
Guest





PostPosted: Fri Jun 25, 2004 11:52 am    Post subject: #pragma link bloat... Reply with quote



I'm familiar with the problem of dangling "#pragma links" causing .exe
bloat after component deletion, so
I was doing a cleanup of this.

As a test, I commented our ALL the pragma links - even those for components
which I'm using. To my surprise, I got no link errors.... Can anyone
explain this?

I build without runtime packages, so I just have a single EXE to distribute.
And the EXE works just fine.

Also, why don't you get #pragma link lines generated for standard VCL
components? I read a ng comment that implied they're inserted "when using
components written in Delphi". Last time I looked, the VCL was still Delphi
<g>

Thanks,
Roddy





Back to top
Craig Farrell
Guest





PostPosted: Sat Jun 26, 2004 2:27 am    Post subject: Re: #pragma link bloat... Reply with quote



Hi,

Quote:
I'm familiar with the problem of dangling "#pragma links" causing .exe
bloat after component deletion, so

I thouhgt that pragma link worked by placing a lib comment record in
the OBJ, that when encountered by the linker, was treated essentially
the same as if the lib comment string (either an OBJ or LIB) was sitting
at the end of the linker command line. In other words, it could still
be optimized out by the linker if you did not really use it. I could
certainly be wrong about that, especially if you are seeing that they
are not being optimized out or ignored by the linker.

Quote:

As a test, I commented our ALL the pragma links - even those for components
which I'm using. To my surprise, I got no link errors.... Can anyone
explain this?

The pragma links pre-dated the linker package switch that generates
a static library for the package. At one time, package generation
produced only .bpl (like a .dll), .bpi (like an import), and obj's.
A later BCB (5 or 6) introduced the -Gl (static package) switch.
This static package .lib is probably on your link line. So pragma
link might be a redundancy but I wonder if it was kept for some special
case reasons such as those circumstances where a component requires
a second componet?(just speculation)

--Craig


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.