Board index » cppbuilder » Type mismatch in redeclaration of 'Form1'

Type mismatch in redeclaration of 'Form1'

I suddenly began getting this error and can't figure out what I did to
cause it.  I've rebuilt after deleting my .obj files and even tried
renaming Form1, all to no avail.  Inspected my .h and .cpp files too...

Any suggestions?  Thanks.

--
Robert Price
bobpr...@enteract.com
"What lies behind us and what lies before us are tiny matters compared to
what lies within us" - Ralph W. Emerson

 

Re:Type mismatch in redeclaration of 'Form1'


Quote
nos...@inmybox.org ( ) wrote:
>  I suddenly began getting this error and can't figure out what I did to
>  cause it.  I've rebuilt after deleting my .obj files and even tried
>  renaming Form1, all to no avail.  Inspected my .h and .cpp files too...

>  Any suggestions?  Thanks.

Can you post the line it is complaing about.

Robert Chafer

Re:Type mismatch in redeclaration of 'Form1'


Hi Robert,

I know one way to get this error is when using a
BCB1-generated form in a BCB3 application. It only
shows up if you USE and #include the BCB1 form and
is caused by the extern reference to the form (in the header)
not having the PACKAGE modifier. So to fix you can
manually add the PACKAGE modifier to the Forms extern
global in the header.

--Craig

Re:Type mismatch in redeclaration of 'Form1'


Quote
On Thu, 09 Apr 1998 11:06:06 GMT, Robert Chafer wrote:
>nos...@inmybox.org ( ) wrote:

>>  I suddenly began getting this error and can't figure out what I did to
>>  cause it.  
>> ....
>Can you post the line it is complaing about.

Yeah (should have done that in the first place of course).  Its the line
right after the class definition in the main form header file that says

extern PACKAGE TForm1 *Form1;

--
Robert Price
bobpr...@enteract.com
"What lies behind us and what lies before us are tiny matters compared to
what lies within us" - Ralph W. Emerson

Re:Type mismatch in redeclaration of 'Form1'


Thanks for the insight.  Its not a BCB1 form but I'll look at those things
anways.

Quote
On Thu, 09 Apr 1998 10:40:52 +0100, Craig Farrell <cNOSPAMfarr...@corp.borland.com> wrote:
>Hi Robert,

>I know one way to get this error is when using a
>BCB1-generated form in a BCB3 application. It only
>shows up if you USE and #include the BCB1 form and
>is caused by the extern reference to the form (in the header)
>not having the PACKAGE modifier. So to fix you can
>manually add the PACKAGE modifier to the Forms extern
>global in the header.

>--Craig

--
Robert Price
bobpr...@enteract.com
"What lies behind us and what lies before us are tiny matters compared to
what lies within us" - Ralph W. Emerson

Other Threads