ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  С++ version with CodeGear 2009 C++ Builder
Posted by second on Jun-08-2011 17:08
May I use ChartDirector for C++ version with CodeGear 2009 C++ Builder (ex. Borland)?

  Re: С++ version with CodeGear 2009 C++ Builder
Posted by second on Jun-08-2011 17:30
While trying to compile "The First Project" from the manual, I got following error messages at the ChartDirector heder file:

[BCC32 Error] chartdir.h(1254): E2303 Type name expected
[BCC32 Error] chartdir.h(1254): E2139 Declaration missing ;
[BCC32 Error] chartdir.h(1275): E2040 Declaration terminated incorrectly
[BCC32 Error] chartdir.h(1275): E2190 Unexpected }

  Re: С++ version with CodeGear 2009 C++ Builder
Posted by Peter Kwan on Jun-10-2011 02:14
Hi second,

"ChartDirector foir C++" has been tested with many versions of Microsoft Visual Studio, and also many versions of gcc. We know some of our customers are using Borland C++ Builder and SUN Studio.

For your case, the chartdir.h(1254) is a line that is reference the "Mark" class. I searched the forum and find a case of naming conflicts. It seems Borlard C++ also have a Mark in the namespace System, and it is automatically included by the compiler. This conflicts with the ChartDirector mark. The solution is to use a namespace to encapsulate the header file. See:

http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&thread=1283313588#N1283396453

Hope this can help.

Regards
Peter Kwan

  Re: С++ version with CodeGear 2009 C++ Builder
Posted by second on Jun-10-2011 19:53
Attachments:
Hi, Peter, thanks for your help!

That issue solved. WOW I've got simplebar.png as file.
Now I'll try to find a way to show it in my window )))))))))))

I was advised to solve the "Mark problem" by another way,
just add "::" operator prior to Mark at chartdir.h file (line 1254):

::Mark *addMark(double value, int lineColor, const char *text = 0, const char *font = 0, double fontSize = 8)
{ ::Mark *ret = new ::Mark(CAxis_addMark(ptr, value, lineColor, text, font, fontSize)); reg(ret); return ret; }

To solve next issue
[Linker Error] Unresolved external '_CBaseChart_destroy' referenced from...........
one may use Builder utility coff2omf.exe
and then add new .lib file to ProjectGroup in Project Manager pallet,
and add .dll file to Debug or Release folder of your project.

Thank you.
simplebar.png