ChartDirector for C++ is released as a zip file on Windows, and as a tar.gz file on Linux, FreeBSD, Mac OS X and Solaris. To install ChartDirector for C++:, simply extract the files from distribution.
- On Windows, you may use Winzip or similar tools to unzip the ChartDirector distribution.
- On Linux, FreeBSD, Mac OS X and Solaris, you may use:
gunzip [chartdir_file_name].tar.gz
tar xvf [chartdir_file_name].tar
ChartDirector for C++ comes with two sets of sample programs.
- Standard cross platform C++ sample programs are available in "ChartDirector/cppdemo". These are command line programs compatible with any standard C++ compilers and work on all supported operating system.
On the Windows edition of ChartDirector, Microsoft VC++ project and workplace files are included for convenience.
On the Linux, FreeBSD, Mac OS X and Solaris editions of ChartDirector, a Makefile is included to compile all sample programs. Each sample program also includes its own Makefile so you may compile each of them individually. Note that the Makefile is based on the "g++" ("gcc") compiler. Please modify it if you are using other compilers.
- On the Windows Edition of ChartDirector, MFC based sample programs are included in "ChartDirector\mfcdemo", with a complete Microsoft VC++ workplace. These are Windows programs that only work with the Microsoft VC++ compiler.
Note : this section is applicable for Windows only.
When you develop a project using ChartDirector, the development environment should be configured appropriately so that it can find the proper header files and link to the proper library files.
- Compilation
All C++ modules that use ChartDirector need to include the file "chartdir.h". The "chartdir.h" will in turn include more header files. All these files are located in the "ChartDirector\include" subdirectory. The development environment header file search path must be configured to include that directory.
- For VC++ 6.0, the steps to do this are: Select "Project/Settings" from the menu bar, click on the "C/C++" tab, in the "Category" list box, select "Preprocessor", then in the "Additional include directories" field, add the path for the "ChartDirector\include" subdirectory.
- For Visual Studio.NET, the steps to do this are: Select "Project/Properties" from the menu bar, go to "C/C++" -> "General", in the "Additional Include Directories" field, add the path for the "ChartDirector\include" subdirectory.
- Linking
After compilation, the object file needs to link with "Chartdirector/lib/chartdir41.lib".
- For VC++ 6.0, the steps to do this are: Select "Project/Settings" from the menu bar, click on the "Link" tab, in the "Object/library modules" field, add the path for the file "chartdir41.lib".
- For Visual Studio.NET, the steps to do this are: Select "Project/Properties" from the menu bar, go to "Linker" -> "Input", in the "Additional Dependencies" field, add the path for the file "chartdir41.lib".
- Execution
When executing the program, the executable needs to find the "chartdir41.dll". That means you need to copy the "chartdir41.dll" to the same directory where the executable runs, or you need to copy it to a directory in the operating system search path (eg. [system32]).
Note : this section is applicable for Linux, FreeBSD, Mac OSX and Solaris only.
When you develop a project using ChartDirector, the development environment should be configured appropriately so that it can find the proper header files and link to the proper library files.
Important Note For Solaris User Using g++/gcc
In Solaris, some compilers (such as g++/gcc) requires an assembler (as) and linker (ld) to produce executable code. Solaris comes standard with as/ld in "/usr/ccs/bin". If you do not find as/ld in "/usr/ccs/bin", please install it from the Solaris CD.
There is an alternative as/ld distributed in the GNU binutils package. The GNU as/ld is incompatible with the Solaris as/ld.
ChartDirector is compiled using the Solaris as/ld. When developing software using ChartDirector, please use the Solaris as/ld, not the GNU as/ld. The GNU as/ld may crash, or the it may produce code that crashes.
If you have installed the GNU binutils package, by default, the gcc compiler will use the GNU as/ld instead of the Solaris as/ld. In this case, please uninstall the GNU binutils, or add the flag "-B/usr/ccs/bin/" in your compile and link statements to tell gcc to use the Solaris as/ld. Simply setting the "path" variable to search for "/usr/ccs/bin" first is not sufficient. The "-B/usr/ccs/bin/" flag must be used.
If you have purchased a license to use ChartDirector, you should have a license code delivered to your via email and postal mail.
If your license key is for upgrading from a previous version of ChartDirector, you need to append the upgrade license key to the previous version license key, and use the combined license key.
There are two alternative methods to install the license key.
- Create a one-line ASCII file using Notepad or other text editor, and put the license code in that line. The whole file should contain only the license code. Name that file "chartdir.lic" and put the file in the same directory as "chartdir41.dll" (for Windows) or "libchartdir.so" (for Linux, FreeBSD, Mac OS X and Solaris).
Make sure your license file is called "chartdir.lic". In particular, Notepad may automatically append ".txt" to the file name when creating a new file. So even if the file is saved as "chartdir.lic", it may end up as "chartdir.lic.txt". If this is the case, please rename the file back to "chartdir.lic".
- An alternative method is to hard code the license key into the source code by using the Chart::setLicenseCode API. This method is recommended if your are redistributing ChartDirector, because your customer will then be unable to see the license key (unless your software is open source).
© 2006 Advanced Software Engineering Limited. All rights reserved.