BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error when compiling

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Greg Stantin
Guest





PostPosted: Sun Dec 21, 2003 3:11 am    Post subject: Error when compiling Reply with quote



I just started getting this error after making some changes to my
source files, i really dont understand what the compiler wants me
to do.

//-------------------------------------------------------------------
// my main form
#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
#include "Rules.h"
#include "Misc.h"
#include "Manage.h"
//--------------------------------------------------------------------
-------
#pragma package(smart_init)
#pragma link "SHDocVw_OCX"
#pragma link "CGAUGES"
#pragma resource "*.dfm"
TfrmMain *frmMain;

// other form where the error occurs
//--------------------------------------------------------------------
-------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <ToolWin.hpp>
#include <ImgList.hpp>
//--------------------------------------------------------------------
-------
class TfrmManage : public TForm
[C++ Error] Manage.h(13): E2141 Declaration syntax error
// cursor is placed between the class and TfrmManage

If i comment out the #include "Manage.h" in the main form, i then get
this new error in the main form.

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
#include "Rules.h"
#include "Misc.h"
//#include "Manage.h"
//--------------------------------------------------------------------
-------
#pragma package(smart_init)
#pragma link "SHDocVw_OCX"
#pragma link "CGAUGES"
#pragma resource "*.dfm"
TfrmMain *frmMain;
[C++ Error] Unit1.cpp(26): E2141 Declaration syntax error

Cursor is between the TfrmMain and *frmMain;

What in the world does all this mean? I just made some modifications
to my program
and i was just about to test it when this happened. I restarted
builder a few times
thinking that was the problem, unfortunately it was not.

Any ideas, anyone.


Back to top
Michel Leunen
Guest





PostPosted: Sun Dec 21, 2003 10:41 am    Post subject: Re: Error when compiling Reply with quote



Greg Stantin wrote:


Quote:
class TfrmManage : public TForm
[C++ Error] Manage.h(13): E2141 Declaration syntax error
// cursor is placed between the class and TfrmManage

If i comment out the #include "Manage.h" in the main form, i then get
this new error in the main form.

[C++ Error] Unit1.cpp(26): E2141 Declaration syntax error

Cursor is between the TfrmMain and *frmMain;

The error is probably coming from another part of your code.
Look in your header files if you didn't miss a ';' after a class
declaration, for instance.
class A
{

};


Michel
--
----------------------------------------
Michel Leunen
mailto:michel (AT) leunen (DOT) com
C++Builder, C++BuilderX, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------


Back to top
Greg Stantin
Guest





PostPosted: Sun Dec 21, 2003 2:57 pm    Post subject: Re: Error when compiling Reply with quote



Quote:
The error is probably coming from another part of your code.
Look in your header files if you didn't miss a ';' after a class
declaration, for instance.

Thanks Michel,

I thought about that and i have been looking, but no luck
so far. I guess i will comment out a lot of code and see
if i can narrow down the problem.

Thanks again for the help.



Back to top
Greg Stantin
Guest





PostPosted: Sun Dec 21, 2003 3:26 pm    Post subject: Re: Error when compiling Reply with quote

Quote:
The error is probably coming from another part of your code.
Look in your header files if you didn't miss a ';' after a class

After you posted this reply, i looked more carefully at all the files
i knew i changed. It appears that i had added in a new function,
but i forgot to add the ';' after the function. That was in a totally
different file, and i had to really look for it. I wish the compiler
would point to the spot when stuff like this happens. It would
make life so much easier.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.