How do you build/use a TChart AX wrapper dll, C++ MFC App
Posted: Thu Sep 01, 2016 12:58 am
I built and ran the C++ examples in VS 2008, 32 bit.
I built and ran a basic C++ MFC Dialog app with a CTChart and updated it with an array of data.
I moved the TeeChart files into a TeeChard.dll project in the solution but cant get the executable to link.
It builds a dll and lib file but wont link the exe, looks like the functions aren't exported into the lib file or something?
VS 2008 Output:
1>------ Build started: Project: RTFMChart, Configuration: Debug Win32 ------
1>Linking...
1>RTFMChartDlg.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CTChart::GetRuntimeClass(void)const " (?GetRuntimeClass@CTChart@@UBEPAUCRuntimeClass@@XZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CPage::SetMaxPointsPerPage(long)" (?SetMaxPointsPerPage@CPage@@QAEXJ@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: class CPage __thiscall CTChart::GetPage(void)" (?GetPage@CTChart@@QAE?AVCPage@@XZ) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CSeries::FillSampleValues(long)" (?FillSampleValues@CSeries@@QAEXJ@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CSeries::Clear(void)" (?Clear@CSeries@@QAEXXZ) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: class CSeries __thiscall CTChart::Series(long)" (?Series@CTChart@@QAE?AVCSeries@@J@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CAspect::SetView3D(int)" (?SetView3D@CAspect@@QAEXH@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: class CAspect __thiscall CTChart::GetAspect(void)" (?GetAspect@CTChart@@QAE?AVCAspect@@XZ) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: long __thiscall CTChart::AddSeries(long)" (?AddSeries@CTChart@@QAEJJ@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>C:\DEV_ChartTest\RTFMChart\Debug\RTFMChart.exe : fatal error LNK1120: 9 unresolved externals
1>Build log was saved at "file://c:\DEV_ChartTest\RTFMChart\RTFMChart\Debug\BuildLog.htm"
1>RTFMChart - 10 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Ive been trying to get it to work for a considerable time now but I'm missing something and need some help.
Is there an MFC example of the best way to build and use a TeeChart AX dll wrapper properly???
Ive seen mention of it being done but cant find any details.
Its been a while since I built/used a dll from scratch. Must be getting old.
I've added a TChart to my application on a property page.
Our project already builds 30 dll's and uses a few 3rd party dll's.
The base directory for the exe already has 2,626 cpp and h files, so I don't want to dump another 750+ TeeChart files into it, I'll get fired.
I'd like to put the TeeChart files into a dll project in our solution and have a C or C++ function library dll and lib file like our other dll's. (or COM interface?)
I was told by sales this is possible and it won't effect other developers from building our solution.
Thanks for the help in advance.
I asked my boss to get the priority support but I think he forgot.
Cheers,
Richard
I built and ran a basic C++ MFC Dialog app with a CTChart and updated it with an array of data.
I moved the TeeChart files into a TeeChard.dll project in the solution but cant get the executable to link.
It builds a dll and lib file but wont link the exe, looks like the functions aren't exported into the lib file or something?
VS 2008 Output:
1>------ Build started: Project: RTFMChart, Configuration: Debug Win32 ------
1>Linking...
1>RTFMChartDlg.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CTChart::GetRuntimeClass(void)const " (?GetRuntimeClass@CTChart@@UBEPAUCRuntimeClass@@XZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CPage::SetMaxPointsPerPage(long)" (?SetMaxPointsPerPage@CPage@@QAEXJ@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: class CPage __thiscall CTChart::GetPage(void)" (?GetPage@CTChart@@QAE?AVCPage@@XZ) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CSeries::FillSampleValues(long)" (?FillSampleValues@CSeries@@QAEXJ@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CSeries::Clear(void)" (?Clear@CSeries@@QAEXXZ) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: class CSeries __thiscall CTChart::Series(long)" (?Series@CTChart@@QAE?AVCSeries@@J@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CAspect::SetView3D(int)" (?SetView3D@CAspect@@QAEXH@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: class CAspect __thiscall CTChart::GetAspect(void)" (?GetAspect@CTChart@@QAE?AVCAspect@@XZ) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>RTFMChartDlg.obj : error LNK2019: unresolved external symbol "public: long __thiscall CTChart::AddSeries(long)" (?AddSeries@CTChart@@QAEJJ@Z) referenced in function "public: void __thiscall CRTFMChartDlg::OnBnClickedBtnMfchart(void)" (?OnBnClickedBtnMfchart@CRTFMChartDlg@@QAEXXZ)
1>C:\DEV_ChartTest\RTFMChart\Debug\RTFMChart.exe : fatal error LNK1120: 9 unresolved externals
1>Build log was saved at "file://c:\DEV_ChartTest\RTFMChart\RTFMChart\Debug\BuildLog.htm"
1>RTFMChart - 10 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Ive been trying to get it to work for a considerable time now but I'm missing something and need some help.
Is there an MFC example of the best way to build and use a TeeChart AX dll wrapper properly???
Ive seen mention of it being done but cant find any details.
Its been a while since I built/used a dll from scratch. Must be getting old.
I've added a TChart to my application on a property page.
Our project already builds 30 dll's and uses a few 3rd party dll's.
The base directory for the exe already has 2,626 cpp and h files, so I don't want to dump another 750+ TeeChart files into it, I'll get fired.
I'd like to put the TeeChart files into a dll project in our solution and have a C or C++ function library dll and lib file like our other dll's. (or COM interface?)
I was told by sales this is possible and it won't effect other developers from building our solution.
Thanks for the help in advance.
I asked my boss to get the priority support but I think he forgot.
Cheers,
Richard