errors needed to debug. desperate!

Aug 10, 2008 at 7:42pm
(am a beginner and really need help from people in this forum)


#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "ieview.hpp"
#include "imageenview.hpp"
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TImageEnView *ImageEnView1;
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif


error messages
e2209 unable to open include file 'ieview.hpp"
e2209 unable to open include file 'imageenview.hpp"
e2303 type name expected for " TImageEnView *ImageEnView1;"
e2139 declaration missing; for " TImageEnView *ImageEnView1;"
e2109 Not an allowed type for " TImageEnView *ImageEnView1;"
Aug 10, 2008 at 8:13pm
As the error says:
unable to open include file 'ieview.hpp"
unable to open include file 'imageenview.hpp"

Do you have those two .hpp files?
Aug 11, 2008 at 1:28am
i ran a search on windows but i cant find the files. to which folder, do i put the files in?
Aug 11, 2008 at 1:30am
If you have the files you must put them in the same directory like your .cpp file.
Aug 11, 2008 at 10:29am
#ifndef ieviewHPP
#define ieviewHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <hyieutils.hpp> // Pascal unit
#include <Graphics.hpp> // Pascal unit
#include <Classes.hpp> // Pascal unit
#include <Forms.hpp> // Pascal unit
#include <Controls.hpp> // Pascal unit
#include <SysUtils.hpp> // Pascal unit
#include <Messages.hpp> // Pascal unit
#include <Windows.hpp> // Pascal unit
#include <SysInit.hpp> // Pascal unit
#include <System.hpp> // Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Ieview
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TIEBitmapChangeEvent)(System::TObject* Sender, bool destroying);

typedef TIEBitmapChangeEvent *PIEBitmapChangeEvent;

class DELPHICLASS TIEView;
class PASCALIMPLEMENTATION TIEView : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;

private:
Forms::TFormBorderStyle FBorderStyle;
Classes::TList* fBmpChange;
Classes::TNotifyEvent fOnMouseEnter;
Classes::TNotifyEvent fOnMouseLeave;
void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
bool __fastcall GetCtl3D(void);
HIDESBASE void __fastcall SetCtl3D(bool v);

protected:
Graphics::TColor fBackGround;
int fDPIX;
int fDPIY;
virtual void __fastcall SetBackGround(Graphics::TColor cl);
virtual Graphics::TBitmap* __fastcall GetFBitmap(void);
virtual Hyieutils::TIEBitmap* __fastcall GetIEBitmap(void);
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
HIDESBASE MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
virtual Hyieutils::TIEBitmap* __fastcall GetAlphaChannel(void) = 0 ;
virtual bool __fastcall GetHasAlphaChannel(void) = 0 ;

public:
virtual void __fastcall RemoveAlphaChannel(bool Merge) = 0 ;
virtual void __fastcall LockPaint(void) = 0 ;
virtual int __fastcall UnLockPaint(void) = 0 ;
virtual int __fastcall NPUnLockPaint(void) = 0 ;
virtual void __fastcall SetDPIX(int dpiX);
virtual void __fastcall SetDPIY(int dpiY);
virtual void __fastcall SetDPI(int dpiX, int dpiY);
virtual void __fastcall ImageChange(void);
__fastcall virtual TIEView(Classes::TComponent* Owner);
__fastcall virtual ~TIEView(void);
__property int DpiX = {read=fDPIX, write=SetDPIX, nodefault};
__property int DpiY = {read=fDPIY, write=SetDPIY, nodefault};
__property Graphics::TBitmap* Bitmap = {read=GetFBitmap};
__property Hyieutils::TIEBitmap* IEBitmap = {read=GetIEBitmap};
virtual void __fastcall CallBitmapChangeEvents(void);
int __fastcall RegisterBitmapChangeEvent(TIEBitmapChangeEvent v);
void __fastcall RemoveBitmapChangeEvent(int idx);
Graphics::TCanvas* __fastcall GetCanvas(void);
__property Hyieutils::TIEBitmap* AlphaChannel = {read=GetAlphaChannel};
__property bool HasAlphaChannel = {read=GetHasAlphaChannel, nodefault};

__published:
__property Graphics::TColor Background = {read=fBackGround, write=SetBackGround, default=-2147483633};
__property Ctl3D = {read=GetCtl3D, write=SetCtl3D, default=1};
__property ParentCtl3D = {default=1};
__property Classes::TNotifyEvent OnMouseEnter = {read=fOnMouseEnter, write=fOnMouseEnter};
__property Classes::TNotifyEvent OnMouseLeave = {read=fOnMouseLeave, write=fOnMouseLeave};
__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
__property OnEnter ;
__property OnExit ;
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TIEView(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
#pragma option pop

};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE int gSystemColors;
extern PACKAGE bool gIsRemoteSession;
extern PACKAGE int gSystemDPIX;
extern PACKAGE int gSystemDPIY;
extern PACKAGE int gDefaultDPIX;
extern PACKAGE int gDefaultDPIY;
extern PACKAGE bool gMMX;
extern PACKAGE int gEdgeX;
extern PACKAGE int gEdgeY;
extern PACKAGE int gBorderX;
extern PACKAGE int gBorderY;
extern PACKAGE int gVScrollWidth;
extern PACKAGE int gHScrollHeight;

} /* namespace Ieview */
using namespace Ieview;
#pragma option pop // -w-
#pragma option pop // -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // ieview




error messages
ee2209 unable ot open include file hyieutils.hpp
e2090 qualifier hyieutils is not a class or namespace name
e2040 declaration terminated incorrectly

lines that cause the errors are in bold.
can anyone guide me?
i have placed all the .hpp files of the imageen into c:\progra~1\borland\project\project_name

did i place them wrongly?
Aug 11, 2008 at 10:34am
OK,
you must understand the #include syntax.
When you have "< >" that means that the compiler will look, for the header file, only at the directory of the default header files.
When you have double quotes (" ") then the compiler will first look at the folder where your .cpp file is and then at the default directory.

So, if #include <hyieutils.hpp> is a file you have in your programs directory change it to #include "hyieutils.hpp"

Hope this helps

(Please use [code][/code] tags... The # button at the right...)
Aug 11, 2008 at 7:54pm
Thanks for all the replies. Problem is solved. However i got this error

"Unable to invoke code completion due to errors in source code"

when i tried to installed a 3rd party package --ImageEn


Before adding anything, the program runs well, However i tried to add the code

ImageEnView1->

thats when the error arises.
can anyone help?

code as follows:


//--------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include <dir.h>
#include <math.h>


#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "WMPLib_OCX"
#pragma link "imageenview"
#pragma link "imageenproc"
#pragma link "histogrambox"
#pragma link "ieview"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::DriveComboBox1Change(TObject *Sender)
{
FileListBox1->Directory = DirectoryListBox1->Directory;
DirectoryListBox1->Drive = FileListBox1->Drive ;

}
//---------------------------------------------------------------------------
void __fastcall TForm1::FilterComboBox1Change(TObject *Sender)
{
FileListBox1->Mask = FilterComboBox1->Mask;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
WindowsMediaPlayer1->URL = FileListBox1->FileName;
WindowsMediaPlayer1->controls->play();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
WindowsMediaPlayer1->close();
WindowsMediaPlayer2->close();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
DriveComboBox1->DirList = DirectoryListBox1;
Button1->Default = true;
FilterComboBox1->Filter = "All files (*.*)|*.*| Video files (*.mpg;*.avi)|*.mpg;*.avi";



Button1->Default = true;

}
//---------------------------------------------------------------------------
ImageEnView1->
Aug 11, 2008 at 8:21pm
I have no idea what all those are but ImageEnView1-> doesn't mean anything.
I suppose ImageEnView1 is a pointer to a class object.
The "->" notation is used to access the members of a class through a pointer.
So, after "->" you must have a member of the ImageEnView class. It is illegal to have it like that...
Topic archived. No new replies allowed.