Project compatible with Builder 3 and Builder XE

Hello there, 

I've got a problem with a fairly old project based on Borland C++ Builder 3 which has to be ported into a Builder XE project, but still has to be used with the Builder 3 compiler now and then.
Changing to the newer compiler wasn't that hard sofar, now the code has to be altered to fit the old compiler again.

The main problem right now is that the Builder XE updates the dfm-files, causing Reading Form Errors in the old builder.


I thought of having two sets of dfm files, one for the old and one for the new compiler.
And then adding the matching form depending on the active compiler using predefinitions, something like:

# if (__BORLANDC__ == 0x0531)
//load old form
# elif (__BORLANDC__ == 0x644)
 //load new form
# else
 //
# endif

But I'm not sure if this is even possible.

Any advice or other ideas how to start on this problem? :)
1
Franziska
4/24/2012 12:54:30 PM
embarcadero.cppbuilder.ide 2180 articles. 1 followers. Follow

4 Replies
647 Views

Similar Articles

[PageSpeed] 56
Get it on Google Play
Get it on Apple App Store

Franziska wrote:

> I've got a problem with a fairly old project based on Borland C++
> Builder 3 which has to be ported into a Builder XE project, but still
> has to be used with the Builder 3 compiler now and then.

You cannot share projects themselves, just the source code, but be prepared 
to use a lot of #ifdef's throughout the code.

> The main problem right now is that the Builder XE updates the
> dfm-files, causing Reading Form Errors in the old builder.

To share DFMs across versions, I would switch the DFMs to text-mode (I don't 
remember if BCB3 even supported that yet, though) to avoid any binary incompatibilities, 
and then ignore any errors that arise when opening a newer DFM in an older 
version, unless you manually (or via a third-party tool) strip out the offending 
properties beforehand that do not exist in the older version.

> I thought of having two sets of dfm files, one for the old and one for
> the new compiler.

That is another option.

> And then adding the matching form depending on the active compiler
> using predefinitions, something like:

I would store the projects in separate folders, and then just reuse the same 
filenames in each folder so no need for #ifdef'ing the DFMs, but change the 
contents of the files as needed for each compiler version.

--
Remy Lebeau (TeamB)
1
Remy
4/24/2012 5:09:18 PM
> 
> To share DFMs across versions, I would switch the DFMs to text-mode (I don't 
> remember if BCB3 even supported that yet, though) to avoid any binary incompatibilities, 
> and then ignore any errors that arise when opening a newer DFM in an older 
> version, unless you manually (or via a third-party tool) strip out the offending 
> properties beforehand that do not exist in the older version.
> 

I've looked throught all the options and couldn't find an option to switch to text mode, the only thing i can do is look at the code when loading the dfm into the internal editor.
I don't suppose there is a way to differ between compilers directly in the dfm?

Stripping the updated properties manually would be too time-consuming, as almost all of the buttons and labels are using new properties.


> 
> I would store the projects in separate folders, and then just reuse the same 
> filenames in each folder so no need for #ifdef'ing the DFMs, but change the 
> contents of the files as needed for each compiler version.

I hoped to avoid that case, as new features would have to be implemented twice.

Edited by: Franziska Herget on Apr 25, 2012 12:17 AM
1
Franziska
4/25/2012 7:17:17 AM
Hello Franziska,

> I've looked throught all the options and couldn't find an option to
> switch to text mode

Right-click on the Form Designer and choose "Text DFM".

> I don't suppose there is a way to differ between compilers directly in
> the dfm?

No.

--
Remy Lebeau (TeamB)
0
Remy
4/25/2012 5:38:32 PM
> 
> > I've looked throught all the options and couldn't find an option to
> > switch to text mode
> 
> Right-click on the Form Designer and choose "Text DFM".
> 

Nope, theres only the option to "View as Text...", the dfms themselves are still binary
0
Franziska
4/26/2012 6:23:54 AM
Reply:

Similar Artilces:

C++ Builder 5 to Builder XE
I've C++ Builder 5 in my machine and my project's code is in Buidler 5. Builder 5 has become obsolete now. I want to upgrade to some latest version of C++ Builder. As of now C++Builder XE is available. Please let me know whether I can compile my code in Builder XE? What are compatibilty issues between Builder 5 and Builder XE? If they are not compatible then please let me know which cd/ dvd of C++ Builder I should buy? <Jyotsna Manale> wrote in message news:416111@forums.embarcadero.com... > I want to upgrade to some latest version of C++ Builder. > As of now C++Build...

Going from C++ Builder XE Achitect Trial to C++ Builder Professional XE
What are the correct steps that I need to perform to go from a trial of C++ Builder XE Architect Trial to a purchased copy of C++ Builder Professional XE? I want to make sure that no traces are left from the installation of the trial version. Thanks I phoned support and here is the reply: Run the 'Modify, Repair, Uninstall' link in the Embarcadero start menu. Then choose 'Upgrade' and follow instructions. ...

Help Update 3 for Delphi XE and C++Builder XE
Help Update 3 for Delphi XE and C++Builder XE http://cc.embarcadero.com/Item/28256 Updated: Fri, 24 Jun 2011 18:52:00 GMT Is the update really new? > {quote:title=Ralf Stocker wrote:}{quote} > Help Update 3 for Delphi XE and C++Builder XE > http://cc.embarcadero.com/Item/28256 > Updated: Fri, 24 Jun 2011 18:52:00 GMT > > Is the update really new? I think so -- but it's nothing major. The update is really BIG though. Not worth it if you're in your cabin in the mountains with a 9600 baud modem connection. ...

Convert to C++ Builder XE from C++ Builder 6 and 2007
Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE? On 6/20/2012 8:20 AM, Girish Duddu wrote: > Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE? The big change is the default string in XE is UnicodeString rather than AnsiString. All VCL String properites (Text, etc.) are Unicode in XE. There are good white papers regarding making this transition on the Embarcadero EDN site. I found that most of the changes I had to make fell into two categories: 1) Places...

BUG (or issue) with Indy, C++ Builder 2010 and C++ Builder XE [Edit]
To reproduce this issue you need a clean installation (from scratch, no additional components installed, no Indy update) of C++ Builder 2010 or XE. It uses Indy 10.5.5 (with 2010) or 10.5.7 (with XE). Note: although it uses Indy to reproduce the issue, the version of Indy and Indy itself is not the one that causes this problem but the linking of C++ binary probably. Steps to reproduce: 1. Create a simple text file with the following content. Save it as "file.txt" or any other name. It can be also full email message but the text below is enough. {code} Subject: =?windows-125...

QuickReport compatibility with Delphi/C++Builder XE?
My company is interested in purchasing the newest version of C++Builder XE; however, the compatibility of QuickReport is a must, as we are planning on upgrading a C++Builder 6 project to XE. 1. I understand that QuickReport is *not* included in Enterprise Editions of C++Builder XE. Is that correct? 2. Assuming I purchase QuickReport Pro from www.qusoft.com, will that be compatible with C++Builder XE? 3. Is there any helpful advice/tricks anyone can give before I tackle this massive project? On 16/09/2010 4:32 PM, Evan Streb wrote: > My company is interested in purchasing the newest ...

C++Builder IDE project manager related question
Hi all, I need some help in resolving a difficulty when adding projects into a project group. Basically, the issue is adding projects with the same project name/identifier into the project group. The project manager will reject this since an existing project with the same name is already in the project group. I know the solution is to rename either the existing project in the group or the new project to be added to the group. However, the new project is actually the same project but of a different version, thus they are with the same name. My current solution is to use a naming scheme...

Naming new console project
When I attempt to create a new console project using project|"Add new project" there doesn't appear to be any way to actually specify the project name. The platform just uses the same name as an existing one, so I end up with multiple instances with the same name in the project list. Very confusing.. All I want to do is to create multiple projects with names of my choice. Could someone please point me to suitable help or explain what I'm not doing? TIA ...

FastMM4 detect memory leak on empty projects with Builder XE
Hi, I am using FastMM4 with all my projects. It's very usefull. To get memory leak report I need to include to the projects the full version of FastMM4 available on sourceforge website because of a bug (see QC22963 for more information). It was working well on C++ Builder 2007. I upgraded to Builder XE and I got a problem : FastMM4 always detect a memory leak on shut down. The problem concerns all old projects as well as empty projects. Does someone know how to solve this problem ? What could I do ? More details that could be usefull : - I used FastMM4 version 4.94 and I ...

Problem on starting C++ Builder XE (several minutes before showing IDE)
Hi all, without apparent reason suddenly my c++ builder XE presents the problem in subject. I tried to repair, unistall and reinstall without fix it. Also the setup application remains several minutes before starting. Is there a mode/way to erase/clear really all the previous installation data? In fact after unistalling/installing the C++ Builder shows me all previous settings and register components. I wouldn't format my PC/OS, please can anyone help me? my environment: C++ Builder XE Windows 7/32bit premium TMS Components pack COMODO firewall AVIRA antivirus (no virus f...

Builder 2009 IDE crashes on exit since Update 3 applied.
Fault bucket 1301513864, type 1 Event Name: APPCRASH Response: None Cab Id: 0 Problem signature: P1: bds.exe P2: 12.0.3420.21218 P3: 4a0b868a P4: rtl120.bpl P5: 12.0.3420.21218 P6: 4a0b8b7f P7: c0000005 P8: 00006c34 P9: P10: Also... - EventData 1301138315 1 APPCRASH None 0 bds.exe 12.0.3420.21218 4a0b868a exceptiondiag120.bpl_unloaded 0.0.0.0 4a0b8b80 c0000005 510f2e34 > {quote:title=Larry Griffiths wrote:}{quote} > Fault bucket 1301513864, type 1 > Event Name: APPCRASH > Respons...

C++ Builder XE
I found some Delphi code to satisfy a need in my C++ Builder application. I created a Delphi unit to contain the code and added it to my project, made sure that the Delphi compiler option to create all C++ builder files was set, and Project->Build the unit. The compiler reports "done" with no errors or warnings, but no .hpp file is created that will enable me to use the unit in my C++ units. I have done this before with C++ Builder 2006 and earlier, the only difference is the "Project->Compile Unit" is what I used and is no longer a menu item in XE. Have I go...

C++Builder XE and RAD Studio XE are now available
The new product info is live on the web sites, trial downloads are available, and the products will be available to purchase worldwide between now and Wednesday. http://www.embarcadero.com/products/cbuilder http://www.embarcadero.com/products/rad-studio Thanks, Tim -- Tim Del Chiaro Product Marketing - RAD Studio, Delphi, C++Builder, Delphi Prism and Delphi for PHP http://delphi-insider.blogspot.com Hm. I was waiting for the final release notes to appear before I'd make up my mind about the new XE-release - and here they are. I've bought every C++ Compiler Bor...

Project Builder FYI...
I don't know if this has been discussed on the list yet... Project Builder recognizes PERL syntax (ala syntax coloring). It seems to be based on having either a ".pm" or ".pl" extension. Just thought this was cool. ...

Web resources about - Project compatible with Builder 3 and Builder XE - embarcadero.cppbuilder.ide

List of Netflix compatible devices - Wikipedia, the free encyclopedia
^ http://www.netflix.com/NetflixReadyDevices , Stream Movies & TV Online, Watch Online Movies, Netflix Ready Device ^ Heater, Brian (July 14, ...

Are your names compatible?: love affinity calculator on the App Store on iTunes
Get Are your names compatible?: love affinity calculator on the App Store. See screenshots and ratings, and read customer reviews.

Philips docks compatible with Apple's Lightning connector
Sets let you organize your photos on Flickr. Explore the 9 photos in this set.

Sony Xperia Z3+: Manual camera compatible! - YouTube
... hour with the Sony Xperia Z3+, we wanted to see if the new Sony flagship is capable of taking advantage of the manual camera APIs Google compatible ...

Budget surplus compatible with NDIS-Oppn
Sky News is Australia's leader in 24-hour news.

Good Game Stories - Backwards Compatible - The Power Glove
In the history of hair-brained game peripheral ideas there’s one that’s so bad it’s almost good - It’s the Nintendo Power Glove!

Sony's 4K movie streaming service compatible with PlayStation 4
Sony tries to destroy bandwidth caps everywhere with 100 GB downloads

Liberals Attack Kenney For Calling Irish Immigrants 'Culturally Compatible' In 2012 (VIDEO)
What did Employment Minister Jason Kenney mean when he said the Irish were culturally compatible with Canada? While in Dublin two years ago Kenney, ...

Asia-Pacific FTA compatible with multilateral trade systems: WTO
Asia-Pacific FTA compatible with multilateral trade systems: WTO People's Daily Online The director-general of the World Trade Organization ...

Swatch planning to introduce Android-compatible smartwatch and mobile payment service, CEO says
While Swatch certainly won't be partnering with Apple on the iPhone maker's upcoming Watch despite an ill-fated rumor that surfaced last year, ...

Resources last updated: 12/28/2015 2:20:22 PM