Urgent: Teechart 2010 tchart.h problem
Urgent: Teechart 2010 tchart.h problem
I included tchart.h in two headers files that are both included in a cpp file, and when compiling, an error occured: "error C2011: 'CTChart' : 'class' type redefinition". I compared the 2010 version of tchart.h and v8 tchart. h and noticed that the
#if !defined(AFX_TCHART_H__1C6F492E_029C_4867_A215_0D740BEDCFD5__INCLUDED_)
#define AFX_TCHART_H__1C6F492E_029C_4867_A215_0D740BEDCFD5__INCLUDED_
is missing in 2010 version tchart.h, which I think could be the cause of the problem. So would anyone please check it out and suggest an solution to it?
#if !defined(AFX_TCHART_H__1C6F492E_029C_4867_A215_0D740BEDCFD5__INCLUDED_)
#define AFX_TCHART_H__1C6F492E_029C_4867_A215_0D740BEDCFD5__INCLUDED_
is missing in 2010 version tchart.h, which I think could be the cause of the problem. So would anyone please check it out and suggest an solution to it?
Re: Urgent: Teechart 2010 tchart.h problem
Would anyone please give some suggestions? It is really urgent.
In each of the two header files, I declared a CTChart varialbe and when I included both in a cpp, the compile error occurs.
In each of the two header files, I declared a CTChart varialbe and when I included both in a cpp, the compile error occurs.
Re: Urgent: Teechart 2010 tchart.h problem
Hello David,
Could you send us a simple project we can run as-is to reproduce the problem here? On the other hand, can you tell us if demos of VC++ Activex 2010 work fine for you?
Thanks,
Could you send us a simple project we can run as-is to reproduce the problem here? On the other hand, can you tell us if demos of VC++ Activex 2010 work fine for you?
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Urgent: Teechart 2010 tchart.h problem
Attached is the test program that will generate the error. It is a VS2008 project. In the testView.cpp, I included two header files
#include "Chart1.h"
#include "Chart2.h"
The error occured when I compiled it. Also, when I opened the demo project "Add data arrays" using vs2008 and compiled it, quite some errors occured, but not the same error as mine, maybe it is because the installed folder is not the default one since I installed it to "C:\Program Files\TeeChart Pro v2010 ActiveX Control". I haven't worked on other demo projects yet.
Please do let me know any update asap. Thanks.
#include "Chart1.h"
#include "Chart2.h"
The error occured when I compiled it. Also, when I opened the demo project "Add data arrays" using vs2008 and compiled it, quite some errors occured, but not the same error as mine, maybe it is because the installed folder is not the default one since I installed it to "C:\Program Files\TeeChart Pro v2010 ActiveX Control". I haven't worked on other demo projects yet.
Please do let me know any update asap. Thanks.
- Attachments
-
- test.zip
- (61.02 KiB) Downloaded 882 times
Re: Urgent: Teechart 2010 tchart.h problem
Hello David,
I could reproduce your error here, but we need that you confirm us, if it Error appears in Demo projects VC++ or these work fine for you.
Thanks,
I could reproduce your error here, but we need that you confirm us, if it Error appears in Demo projects VC++ or these work fine for you.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Urgent: Teechart 2010 tchart.h problem
I tried to open the projects under Visual C++\version 6\ with VS2008, and after the conversion to VS2008, the adding data arrays and drag points demo had errors when I tried to open the resource to check the dialog. The error screens are attached. I reinstalled ver2010 again and the problems remained. When I tested the demo under Examples\Visual Studio .NET\Vc++\Dragging Points using VS2008, the same error occured.
- Attachments
-
- Dragging.JPG (15.42 KiB) Viewed 19685 times
-
- AddingArray.JPG (15.04 KiB) Viewed 19676 times
Re: Urgent: Teechart 2010 tchart.h problem
Hello David,
Once solved, the problem of Demos in VC++ by coping the classes of Activex2010\Utilities\New vcl Classes to the root folder of demo examples. We need if it possible, you send the same project with VC++ 2008 in VC++ 6 so we try to solve the problem, converting of VC++ 6 project to VC++ 2008.
Thanks,
Once solved, the problem of Demos in VC++ by coping the classes of Activex2010\Utilities\New vcl Classes to the root folder of demo examples. We need if it possible, you send the same project with VC++ 2008 in VC++ 6 so we try to solve the problem, converting of VC++ 6 project to VC++ 2008.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Urgent: Teechart 2010 tchart.h problem
I could follow what you want. Would you please list what you want me to do step by step? Also, I am not sure if you are addressing my initial problem, which is the erro of redefinition of CTChart class when two header files that both include tchart.h are included in the same cpp file.
Re: Urgent: Teechart 2010 tchart.h problem
Hello David,
Could you please try creating a similar project in VC++ 6 instead of VS2008? The idea is to get it working in VC++ 6 and then let VS2008 upgrade it automatically.
Thanks,
Could you please try creating a similar project in VC++ 6 instead of VS2008? The idea is to get it working in VC++ 6 and then let VS2008 upgrade it automatically.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Urgent: Teechart 2010 tchart.h problem
First of all, I don't have VC6. Secondly, even if I had VC6, I don't think it is acceptable to build future projects in VC6 first and convert to VS2008. Thirdly, I have been using Teechart 8 for a long time in VS2008 and everything worked fine, so I really think there is something wrong with the 2010 version tchart.h, which I think is the missing of #ifndef...#define...#endif that was used in previous versions to avoid redefinition. Finally, I worked out a way to write a new header file tchartinc.h as below
#ifndef _Teechart_version_2010_
#define _Teechart_version_2010_
#include "tchart.h"
#endif
then instead of including tchart.h, I included tchartinc.h and the problem was solved.
I do hope you look into the codes and correct this error in the next release.
#ifndef _Teechart_version_2010_
#define _Teechart_version_2010_
#include "tchart.h"
#endif
then instead of including tchart.h, I included tchartinc.h and the problem was solved.
I do hope you look into the codes and correct this error in the next release.
Re: Urgent: Teechart 2010 tchart.h problem
Hello David,
ok, I'm glad to hear all is working fine.Thanks for the comment about the fix, we'll update the files for the next maintenance releaes which is planned to be out during this week.
ok, I'm glad to hear all is working fine.Thanks for the comment about the fix, we'll update the files for the next maintenance releaes which is planned to be out during this week.
Pep Jorge
http://support.steema.com
http://support.steema.com