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

Message ListMessage List     Post MessagePost Message

  Is it possible to call from C
Posted by Jo on Aug-04-2014 05:14
Sorry for the dumb question.
Is it possible to call ChartDirector from a C program instead of C++?

  Re: Is it possible to call from C
Posted by Peter Kwan on Aug-05-2014 01:57
Hi Jo,

You would need to write the C to C++ wrapper yourself. See:

http://stackoverflow.com/questions/7691035/c-wrapper-for-c

Another method you may consider is to write the charting part of the code in a separate
C++ file. For example, you may create a cpp file and implement the function:

void createChart(double *myData, int length, ...)
{

   .... some ChartDirector code ....

}

Then in your C code, you can call the above function:

//function prototype in C
void createChart(double *myData, int length, ...);

....

createChart(......);

Regards
Peter Kwan