LNK2019 error from cseriespointeritems

TeeChart for ActiveX, COM and ASP
Post Reply
DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

LNK2019 error from cseriespointeritems

Post by DVT » Mon Dec 08, 2014 8:33 pm

It looks like this is a new classes in TeeChart2014.0.02. After I installed this new version, my project is broken. It didn't get compiled in VC2012 before I include "seriespointeritems.h" in my files. The code in question is:

m_Chart.Series(i).GetAsPoint().GetPointer().SetInflateMargins(false);
m_Chart.Series(i).GetAsLine().GetPointer().SetVisible(false);

It looks like GetPointer() now returns CSeriesPointerItems instead of CPointer as before. It gets compiled after "seriespointeritems.h" is included. However, some link errors come up:

Core_AnalyzerView.obj : error LNK2019: unresolved external symbol "public: void __thiscall CSeriesPointerItems::SetInflateMargins(int)" (?SetInflateMargins@CSeriesPointerItems@@QAEXH@Z) referenced in function "protected: void __thiscall CCore_AnalyzerView::SetPlotProperty(void)" (?SetPlotProperty@CCore_AnalyzerView@@IAEXXZ)

Core_AnalyzerView.obj : error LNK2019: unresolved external symbol "public: void __thiscall CSeriesPointerItems::SetVisible(int)" (?SetVisible@CSeriesPointerItems@@QAEXH@Z) referenced in function "protected: void __thiscall CCore_AnalyzerView::SetPlotProperty(void)" (?SetPlotProperty@CCore_AnalyzerView@@IAEXXZ)

Do I miss anything? I could not understand why GetAsPoint().GetPointer() returns a different type not kept consistent as before?

DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

Re: LNK2019 error from cseriespointeritems

Post by DVT » Mon Dec 08, 2014 8:42 pm

Just clear it out - in the previous post,

CTChart m_Chart;

And looks like series IPointer3DSeries.Pointer is kept the same as before but ICUstomSeries.Pointer (series line and point) are changed to type ISeriesPointerItems.
Attachments
pointer_types.png
pointer_types.png (31.32 KiB) Viewed 25411 times

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: LNK2019 error from cseriespointeritems

Post by Yeray » Tue Dec 09, 2014 11:38 am

Hello,

What TeeChart version are you coming from?
This change was applied in TeeChart VCL v2013.09 (note TeeChart ActiveX is a TeeChart VCL wrapper) and it was explained in the Whats New page:
Line, Area, Point Series (and derived series from TCustomSeries)
  • New Pointer.Items property

    Series Pointers can now be customized individually, for example:

    Code: Select all

    Series1.Pointer.Items[12].Color := clRed
    
    Series1.Pointer[34].Visible := False
    When a pointer item has been modified, changes to the global Series1.Pointer property will not be used.

    To reset a pointer item to its default values, set to nil:

    Code: Select all

    Series1.Pointer[12] := nil
    To remove all custom pointer items completely, call Clear:

    Code: Select all

    Series1.Pointer.Clear
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

Re: LNK2019 error from cseriespointeritems

Post by DVT » Thu Dec 11, 2014 8:52 pm

I upgraded my projects to TeeChart2014 from an earlier TeeChart version than v2013. I defined CPointer variables to store the returned values from GetPointer(); the function in the latest version returns CSeriesPointerItems which causes my project failure during compile. After I changed my code, everything is OK now. However, it was not a good idea to change the return type of any existing functions.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: LNK2019 error from cseriespointeritems

Post by Yeray » Fri Dec 12, 2014 8:28 am

Hello,
DVT wrote:I upgraded my projects to TeeChart2014 from an earlier TeeChart version than v2013. I defined CPointer variables to store the returned values from GetPointer(); the function in the latest version returns CSeriesPointerItems which causes my project failure during compile. After I changed my code, everything is OK now. However, it was not a good idea to change the return type of any existing functions.
I see. I'm sorry for the inconvenience generated.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

0692
Newbie
Newbie
Posts: 4
Joined: Fri Jan 23, 2015 12:00 am

Re: LNK2019 error from cseriespointeritems

Post by 0692 » Mon Mar 02, 2015 8:44 am

Please show me the detail solutions.

Original code using V8
c_Chart.Series(0).GetAsLine().GetPointer().SetHorizontalSize(2);
c_Chart.Series(0).GetAsLine().GetPointer().SetVerticalSize(2);

How to fix in V2014 ?

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: LNK2019 error from cseriespointeritems

Post by Yeray » Mon Mar 02, 2015 3:15 pm

Hello,

In a new MFC project following the instructions here, I can create a LineSeries, make the Pointer Visible and change its Pointer HorizontalSize and VerticalSize with the following code:

Code: Select all

#include "CSeries.h"
#include "CLineSeries.h"
#include "CPointer.h"
//...
void CMFCApplication1Dlg::initChart()
{
	//...
	mChart1.AddSeries(0);
	CSeries s = mChart1.get_aSeries(0);
	s.FillSampleValues(10);

	CLineSeries ls = s.get_asLine();
	CPointer pls = ls.get_Pointer();
	pls.put_Visible(true);
	pls.put_HorizontalSize(2);
	pls.put_VerticalSize(2);
}
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

0692
Newbie
Newbie
Posts: 4
Joined: Fri Jan 23, 2015 12:00 am

Re: LNK2019 error from cseriespointeritems

Post by 0692 » Tue Mar 03, 2015 6:38 am

Thanks.

But I am porting old projects using TeeChart OCX from V8 to V2014, not creating new project.
I want to know how to modify the making-trouble "GetPointer()" function to made the existing project working as before.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: LNK2019 error from cseriespointeritems

Post by Yeray » Tue Mar 03, 2015 9:00 am

Hello,
0692 wrote:But I am porting old projects using TeeChart OCX from V8 to V2014, not creating new project.
I want to know how to modify the making-trouble "GetPointer()" function to made the existing project working as before.
The customer above, "DVT", solved this changing the return type of GetPointer() from CPointer to CSeriesPointerItems:
DVT wrote:I defined CPointer variables to store the returned values from GetPointer(); the function in the latest version returns CSeriesPointerItems which causes my project failure during compile. After I changed my code, everything is OK now.
Have you tried this?
Actually, in the new application I mentioned in my last post, changing the return type of GetPointer() from CPointer to CSeriesPointerItems also works:

Code: Select all

#include "CSeries.h"
#include "CLineSeries.h"
//#include "CPointer.h"
#include "CSeriesPointerItems.h"
//...
void CMFCApplication1Dlg::initChart()
{
   //...
   mChart1.AddSeries(0);
   CSeries s = mChart1.get_aSeries(0);
   s.FillSampleValues(10);

   CLineSeries ls = s.get_asLine();
   //CPointer pls = ls.get_Pointer();
   CSeriesPointerItems pls = ls.get_Pointer();
   pls.put_Visible(true);
   pls.put_HorizontalSize(2);
   pls.put_VerticalSize(2);
}
If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

0692
Newbie
Newbie
Posts: 4
Joined: Fri Jan 23, 2015 12:00 am

Re: LNK2019 error from cseriespointeritems

Post by 0692 » Wed Mar 04, 2015 12:20 am

Would you please send me your working project to me? Thanks a lot.
I am using VS2013 VC++ MFC.

0692
Newbie
Newbie
Posts: 4
Joined: Fri Jan 23, 2015 12:00 am

Re: LNK2019 error from cseriespointeritems

Post by 0692 » Wed Mar 04, 2015 1:01 am

Thank you very much.
I have solved this problem.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: LNK2019 error from cseriespointeritems

Post by Yeray » Wed Mar 04, 2015 8:20 am

Great! I'm glad to hear it!
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply