Can not link Derived TRectangleTool
Posted: Tue Jul 12, 2011 12:05 pm
Hi,
I've been attempting to do this over and over with no success. All I wanted to do is to derive a class form TRectangleTool. And I always get the link error:
[ILINK32 Error] Error: Unresolved external '__fastcall Teetools::TAnnotationTool::DrawTextW()' referenced from C:\DOCUMENTS AND SETTINGS\BENGST\MY DOCUMENTS\RAD STUDIO\PROJECTS\DEBUG\WIN32\UNIT1.OBJ
I'm using C++ XE Pro with TeeChrt 2011 Pro. I was getting "DrawTextA()" link error with earlier version!
What is the problem?
Please see the following simple code!
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "Chart.hpp"
#include "TeEngine.hpp"
#include "TeeProcs.hpp"
#include "TeeTools.hpp"
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TMyRectangleTool : public TRectangleTool
{
public: // User declarations
__fastcall TMyRectangleTool(TComponent* Owner);
};
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TChart *Chart1;
TPanel *Panel1;
TRectangleTool *ChartTool1;
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "Chart"
#pragma link "TeEngine"
#pragma link "TeeProcs"
#pragma link "TeeTools"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TMyRectangleTool::TMyRectangleTool(TComponent* Owner)
: TRectangleTool(Owner)
{
}
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
TMyRectangleTool * p = new TMyRectangleTool(Owner);
}
//---------------------------------------------------------------------------
Thanks
I've been attempting to do this over and over with no success. All I wanted to do is to derive a class form TRectangleTool. And I always get the link error:
[ILINK32 Error] Error: Unresolved external '__fastcall Teetools::TAnnotationTool::DrawTextW()' referenced from C:\DOCUMENTS AND SETTINGS\BENGST\MY DOCUMENTS\RAD STUDIO\PROJECTS\DEBUG\WIN32\UNIT1.OBJ
I'm using C++ XE Pro with TeeChrt 2011 Pro. I was getting "DrawTextA()" link error with earlier version!
What is the problem?
Please see the following simple code!
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "Chart.hpp"
#include "TeEngine.hpp"
#include "TeeProcs.hpp"
#include "TeeTools.hpp"
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TMyRectangleTool : public TRectangleTool
{
public: // User declarations
__fastcall TMyRectangleTool(TComponent* Owner);
};
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TChart *Chart1;
TPanel *Panel1;
TRectangleTool *ChartTool1;
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "Chart"
#pragma link "TeEngine"
#pragma link "TeeProcs"
#pragma link "TeeTools"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TMyRectangleTool::TMyRectangleTool(TComponent* Owner)
: TRectangleTool(Owner)
{
}
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
TMyRectangleTool * p = new TMyRectangleTool(Owner);
}
//---------------------------------------------------------------------------
Thanks