Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Minimized C++Builder Exe Size


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 6 - Last Post: Jan 19, 2018 2:43 PM Last Post By: roca robin
roca robin

Posts: 140
Registered: 9/10/06
Minimized C++Builder Exe Size  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 16, 2018 12:51 PM
like Delphi, like this,

program DelphiOpenCv;
{$IFOPT D-}{$WEAKLINKRTTI ON}{$ENDIF}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}

uses
...

how to in c++builder?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Minimized C++Builder Exe Size [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 16, 2018 1:50 PM   in response to: roca robin in response to: roca robin
roca robin wrote:

{$IFOPT D-}{$WEAKLINKRTTI ON}{$ENDIF}

AFAIK, there is no equivilent for {$WEAKLINKRTTI} in C++.

{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}

The C++ equivilent of {$RTTI} is #pragma explicit_rtti:

http://docwiki.embarcadero.com/RADStudio/en/Pragma_explicit_rtti

For example:

#pragma explicit_rtti methods () properties () fields ()


--
Remy Lebeau (TeamB)
Alex Belo

Posts: 626
Registered: 10/8/06
Re: Minimized C++Builder Exe Size [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 17, 2018 7:12 AM   in response to: roca robin in response to: roca robin
roca robin wrote:

like Delphi, like this,

program DelphiOpenCv;
{$IFOPT D-}{$WEAKLINKRTTI ON}{$ENDIF}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
...
how to in c++builder?

Working with RTTI
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Working_with_RTTI

#pragma explicit_rtti
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Pragma_explicit_rtti

Trimming The Fat - Smaller Windows .exe Sizes With Delphi And C++Builder
http://www.blong.com/Articles/TrimTheFat/

--
Alex
Alex Belo

Posts: 626
Registered: 10/8/06
Re: Minimized C++Builder Exe Size [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 17, 2018 7:15 AM   in response to: roca robin in response to: roca robin
roca robin wrote:

like Delphi, like this,

program DelphiOpenCv;
{$IFOPT D-}{$WEAKLINKRTTI ON}{$ENDIF}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
...
how to in c++builder?

Working with RTTI
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Working_with_RTTI

#pragma explicit_rtti
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Pragma_explicit_rtti

Trimming The Fat - Smaller Windows .exe Sizes With Delphi And C++Builder
http://www.blong.com/Articles/TrimTheFat/

--
Alex
roca robin

Posts: 140
Registered: 9/10/06
Re: Minimized C++Builder Exe Size  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 19, 2018 12:01 PM   in response to: roca robin in response to: roca robin
I hope moderators here make default Post as Question so I or someone could won't forget it was posted or mark as question.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Minimized C++Builder Exe Size  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 19, 2018 12:57 PM   in response to: roca robin in response to: roca robin
roca robin wrote:

I hope moderators here make default Post as Question so I or someone
could won't forget it was posted or mark as question.

Nope, not likely to happen. Not every post is a question. In fact,
the majority of posts are not. It would require more work for people
to UNMARK a post as not being a qustion, then it would be for people to
MARK a post as being a question. Besides, if you forget to mark a new
post as a question, you have 15 minutes after posting it to go back and
mark it.

--
Remy Lebeau (TeamB)
roca robin

Posts: 140
Registered: 9/10/06
Re: Minimized C++Builder Exe Size  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 19, 2018 2:43 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
roca robin wrote:

I hope moderators here make default Post as Question so I or someone
could won't forget it was posted or mark as question.

Nope, not likely to happen. Not every post is a question. In fact,
the majority of posts are not. It would require more work for people
to UNMARK a post as not being a qustion, then it would be for people to
MARK a post as being a question. Besides, if you forget to mark a new
post as a question, you have 15 minutes after posting it to go back and
mark it.

--
Remy Lebeau (TeamB)

What if I forgot the 15 minutes,, then I noticed during the last reply and thinking to closed it.
So, I think it's much better to mark it a question is always there,, :D
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02