Page 1 of 1

LNK2019 error from cseriespointeritems

Posted: Mon Dec 08, 2014 8:33 pm
by 16657756
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?

Re: LNK2019 error from cseriespointeritems

Posted: Mon Dec 08, 2014 8:42 pm
by 16657756
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.

Re: LNK2019 error from cseriespointeritems

Posted: Tue Dec 09, 2014 11:38 am
by yeray
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

Re: LNK2019 error from cseriespointeritems

Posted: Thu Dec 11, 2014 8:52 pm
by 16657756
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.

Re: LNK2019 error from cseriespointeritems

Posted: Fri Dec 12, 2014 8:28 am
by yeray
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.

Re: LNK2019 error from cseriespointeritems

Posted: Mon Mar 02, 2015 8:44 am
by 16671286
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 ?

Re: LNK2019 error from cseriespointeritems

Posted: Mon Mar 02, 2015 3:15 pm
by yeray
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);
}

Re: LNK2019 error from cseriespointeritems

Posted: Tue Mar 03, 2015 6:38 am
by 16671286
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.

Re: LNK2019 error from cseriespointeritems

Posted: Tue Mar 03, 2015 9:00 am
by yeray
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.

Re: LNK2019 error from cseriespointeritems

Posted: Wed Mar 04, 2015 12:20 am
by 16671286
Would you please send me your working project to me? Thanks a lot.
I am using VS2013 VC++ MFC.

Re: LNK2019 error from cseriespointeritems

Posted: Wed Mar 04, 2015 1:01 am
by 16671286
Thank you very much.
I have solved this problem.

Re: LNK2019 error from cseriespointeritems

Posted: Wed Mar 04, 2015 8:20 am
by yeray
Great! I'm glad to hear it!