🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.migration
Article #235

Re: BCB5 to 2007

#235
From: Marshall
Date: Fri, 14 Mar 2008 20:23
66 lines
3723 bytes
Remy:

Wow! All good info! I'm new to 2007 BUT not to BCB. I appreciate the 
detailed explanation which gives me a good sense of direction. Assuming will 
get me every time!

I haven't seen a good reference yet as to what includes are needed for the 
different VCL objects??? Is there a good reference under a specific section 
that I'm obviously missing???

BTW: I'm not real thrilled about the upgrade (because of these little 
oddities, not unique to Borland) but I needed to get current for support 
reasons.

Thank you

Marshall



"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:47dadc3e$1@newsgroups.borland.com...
>
> "Marshall" <infsoft@centurytel.net> wrote in message 
> news:47dad19c$1@newsgroups.borland.com...
>
>> I keep getting the error during compile time of
>>
>> "[BCC32 Error] misc100.cpp(11): E2147 'TStringGrid' cannot start a 
>> parameter declaration"
>
> That error means that TStringGrid has not been defined yet.  You do not 
> have Grids.hpp included in the code, or have not made a forward 
> declaration for it, before trying to use it in the function declaration.
>
>> #include <vcl.h>
>
> Including vcl.h by itself is not enough to pull in everything the VCL has 
> to offer.  Many times, you still need to include other header files as 
> well. In this case, you are trying to use types that are defined in 
> Forms.hpp and Grids.hpp.  TForm works fine because vcl0.h always includes 
> Forms.hpp. However, if you look at what vcl0.h actually does, you will see 
> that Grids.hpp is included only if INC_VCLEXT_HEADERS is defined. 
> INC_VCLEXT_HEADERS is defined by vcl4.h.  When you include vcl.h in your 
> code, the compiler automatically substitutes it with either vcl1.h, 
> vcl2.h, vcl3.h, or vcl4.h, based on the project settings.  Each one of 
> those header files defines a different set of options for vcl0.h to use.
>
> So, what is likely happening is that your BCB 5 project is configured in 
> such a way that the compiler decides to use vcl4.h, but your BCB 2007 
> project is configured in such a way that a different VCL header file is 
> used instead, and thus Grids.hpp is not being included automatically.
>
> It is for reasons like this that you should never rely on the compiler's 
> internal behavior to do things for you.  If you need to use TStringGrid, 
> then you should explicitally include Grids.hpp in your own code.  If vcl.h 
> includes Grids.hpp on its own, then your inclusion will simply be ignored. 
> But in both cases, TStringGrid will be a known type for your code to use. 
> This logic applies to every other data type you ever want to use in any 
> project.  Don't make assumptions about what the compiler may or may not 
> define automatically.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <47daded3$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <47dad19c$1@newsgroups.borland.com> <47dadc3e$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 110f51,d6bd45b17d20d4da
X-Google-Attributes: gid110f51,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marshall" <infsoft@centurytel.net>
Newsgroups: borland.public.cppbuilder.migration
References: <47dad19c$1@newsgroups.borland.com> <47dadc3e$1@newsgroups.borland.com>
Subject: Re: BCB5 to 2007
Date: Fri, 14 Mar 2008 15:23:46 -0500
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 207.119.57.134
Message-ID: <47daded3$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1205526227 207.119.57.134 (14 Mar 2008 13:23:47 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail