Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 02, 2016, 04:19:58 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Something you should know about C++ Builder  (Read 10848 times)

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
Something you should know about C++ Builder
« on: May 25, 2006, 09:59:11 AM »
Not knowing much about anything, I translated & compiled a project I had written in Delphi 6, with C++ Builder 6.

This ran just fine on my PC and the file size was nice and small...I was impressed.

Then I gave the file to someone else and that was when the problems began....it started complaining of missing .dll's on their pc.

If you want to distribute your files and avoid the problem I had this is what you have to do:

Quote
  • Under project/options/linker you need to uncheck "Use Dynamic RTL"
  • and under project/options/packages you need to uncheck "Build with Runtime Libraries."

Unless you do this, others will have trouble running your apps.

Be prepared to see the file size grow enormously.

This applies to C++ Builder, not Delphi. The default settings in Delphi work just fine and you don't have to change them.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #1 on: May 25, 2006, 10:28:55 AM »
very good advice app - your description and instructions are exactly right; and i advise all people to choose those settings.  file size will grow but the program will be self-contained.

(Delphi has the same issue but more people happen to have the delphi runtime .dlls already installed on their computer).

ps.  Love your new avatar app  :up:

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #2 on: May 25, 2006, 10:37:25 AM »
delphi does have the same issue...but the default settings are different than C++ builder's settings...they are already set correctly

(thanks for the avatar compliment :))
« Last Edit: May 25, 2006, 10:40:06 AM by app103 »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #3 on: May 25, 2006, 10:48:01 AM »
>_<

It's a lot better to link dynamically and the redistribute the runtimes. BCB and Delphi code generation is bad enough on it's own, but with statically linked runtimes the exe file size is plain enormous. This is bad for people on slow ADSL connections, or even worse, those still on ISDN or regular modems.

Also, with dynamically linked runtimes, the runtime code is shared between multiple delphi/bcb apps running... not to mention that with delphi/bcb apps protected with asprotect or whatever (*sigh*), at least the runtime won't be included in the memory overhead.
- carpe noctem

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #4 on: May 29, 2007, 07:09:25 AM »
Can you not include a snippet of code in your program to check for these dlls and download /register them for the user. That way when not needed the exe can stay small and can still be shared? (i don't know anything about c++)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #5 on: May 29, 2007, 07:14:56 AM »
you know justice, this would be a great feature to add to a 3rd party exe compressor.. going to pass this on to db90h who hangs out here and is the brains behind PECompact (www.bitsum.com), which I use on some of my programs.

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #6 on: May 29, 2007, 07:30:54 AM »
According to Mark Twain: “All you need in this life is ignorance and confidence, and then success is sure.”  ;)

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #7 on: May 29, 2007, 10:34:41 AM »
Can you not include a snippet of code in your program to check for these dlls and download /register them for the user. That way when not needed the exe can stay small and can still be shared? (i don't know anything about c++)

This is actually a feature I had in the product PEBundle, which I need to get off my ass and resurrect (version 4 has been vaporware ;o). I quit selling the older version because I wasn't maintaining it and had a rewrite planned. Maybe someday soon I will finish it ;p.

Anyway, it would be easily implementable without need of an executable compressor/packer/bundler through use of a stub executable which has only system DLL dependencies. The stub executable could check for the presence of dependencies of the main executable, download and register if necessary, then pass control to the main executable.

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #8 on: May 29, 2007, 10:36:09 AM »
According to Mark Twain: “All you need in this life is ignorance and confidence, and then success is sure.”  ;)

Excellent quote, btw.. reading it just set the tone of my day ;).

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #9 on: May 30, 2007, 06:49:08 AM »
You could also exploit DLL delay-loading for this... though it would require a little work.
- carpe noctem

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #10 on: May 31, 2007, 06:39:11 PM »
Quote
Anyway, it would be easily implementable without need of an executable compressor/packer/bundler through use of a stub executable which has only system DLL dependencies. The stub executable could check for the presence of dependencies of the main executable, download and register if necessary, then pass control to the main executable.

that's a very nice idea too -- and would make a nice coding snack type program.  basically you want a tiny exe which can be configured with a list of pre-requisite requirements, along with accompanying web pages and info messages.  you run it and it checks the pre-requisite requirements, giving the user a report of what they are missing and where to get it and offering to open the web pages for them to download them.  if all requirements are found, it simply calls the true app.  very nice idea i may write this myself.

thunder7

  • Supporting Member
  • Joined in 2005
  • **
  • Posts: 169
  • Thunder7
    • View Profile
    • http://www.artwanted.com/thunder7/
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #11 on: July 06, 2008, 07:42:45 AM »
How much does it cost for say Delphi ? And how hard is it to learn?

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #12 on: July 06, 2008, 08:07:50 AM »
If you just want Delphi, check out this link, there's a "buy now" button. There's also the "RAD Studio" which includes C++ builder and Delphi dotNET as well, the pro version is about 5x more expensive than just Delphi, though... and the "enterprise" and "architect" versions are even worse :)
- carpe noctem

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #13 on: July 06, 2008, 10:29:37 AM »
You can get both Turbo Delphi Explorer and Turbo C++ Explorer (same as C++ Builder) for free.  :D

The only real issue with the free versions is that you can not install 3rd party components into your IDE. You can still use them, just can't have them on the toolbar to drag & drop to a form. All the standard VCL is still there though.

thunder7

  • Supporting Member
  • Joined in 2005
  • **
  • Posts: 169
  • Thunder7
    • View Profile
    • http://www.artwanted.com/thunder7/
    • Read more about this member.
    • Donate to Member
Re: Something you should know about C++ Builder
« Reply #14 on: July 14, 2008, 04:34:32 AM »
Thank You! I have bookmarked all these AWESOME links.

I have to say, and I am not BS'ing you when I say this either Programmers are just so COOL! 8)  8)  8)  8)   8)  8)  8)