Page 1 of 1

TeePro 2011 & BCB 6: new TChart component

Posted: Wed Sep 07, 2011 10:22 am
by 16560059
Hi,

I tried to make new TChart component using standard BCB 6 tools (New component, ancestor type TChart, and so on). I get unit Chart1:

Code: Select all

#ifndef Chart1H
#define Chart1H
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Classes.hpp>
#include <Chart.hpp>
#include <Controls.hpp>
#include <ExtCtrls.hpp>
#include <TeEngine.hpp>
#include <TeeProcs.hpp>
//---------------------------------------------------------------------------
class PACKAGE TChart1 : public TChart
{
private:
protected:
public:
 __fastcall TChart1(TComponent* Owner);
__published:
};
//---------------------------------------------------------------------------
#endif
and correspondingly

Code: Select all

#pragma hdrstop

#include "Chart1.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
// ValidCtrCheck is used to assure that the components created do not have
// any pure virtual functions.
//

static inline void ValidCtrCheck(TChart1 *)
{
 new TChart1(NULL);
}
//---------------------------------------------------------------------------
__fastcall TChart1::TChart1(TComponent* Owner)
 : TChart(Owner)
{
}
//---------------------------------------------------------------------------
namespace Chart1
{
 void __fastcall PACKAGE Register()
 {
   TComponentClass classes[1] = {__classid(TChart1)};
   RegisterComponents("Samples", classes, 0);
 }
Nothing special, empty new component, just to check. But after compilation I have the linker error:
[Linker Error] Unresolved external '__fastcall Teeprocs::TCustomTeePanelExtended::GetDeviceContext(void *&)' referenced from D:\OBJ\CHART1.OBJ
In version 8 I had no problems and it worked!!!

Re: TeePro 2011 & BCB 6: new TChart component

Posted: Thu Sep 08, 2011 11:43 am
by yeray
Hello Vadik,

It sounds like a missing reference or crossed references. Could you please check the IDE library and include paths and correct any reference to a wrong TeeChart reference? If you are working with an old project, please check also the references in it (editing the project files manually with notepad or similar).

Re: TeePro 2011 & BCB 6: new TChart component

Posted: Thu Sep 08, 2011 1:58 pm
by 16560059
Hi Yeray,

It seems problem not in references. I have a lot of another components designed by me for previous versions of TeeChart and all of them compiled and installed in 2011 without any problem. The only exception is components with ancestor type TChart. I have package with 5 components including my TChart. I cant install it due to error I mentioned early. But if I just remove from package my TChart component, package with another 4 components installed correctly.

Re: TeePro 2011 & BCB 6: new TChart component

Posted: Fri Sep 09, 2011 9:22 am
by narcis
Hi Vadik,

If you have other components (own or 3rd party) that use TeeChart you should recompile them with the new TeeChart version. If they are your own components or 3rd party with source code you need to upgrade and recompile them doing something similar to what's described in the QuickReport article here. If you don't have access to the sources for compiling 3rd party components please ask vendors for packages updated to the last TeeChart version.