CAM C++ Class Source (in .zip form)
The CAM C++ class source is distributed as subdirectories in compressed (.zip) form
What to do with the .zip files
Class .zip files
| Zip Files | File Date | |
| camgraph.zip | Feb. 03, 1999 | Graphics classes. |
| cammva.zip, camblas.zip, camlapack.zip | Feb. 03, 1999 | Matrix/Vector/Array classes and supporting source. |
| camsymfun.zip | Feb. 09, 1999 | Symbolic function class. Used to create functions from a symbolic representation. |
| camgeo.zip | Geometric entity classes. |
Chris Anderson © UCLA 1997
Create a directory and then place copies of the .zip files in it. Invoke an appropriate inflation routine (see below) on the .zip files. Sub-directories containing the source and documentation files are then created.
The standard way of using these classes is to compile the source code for a particular class into a library, and then link the library to your program. Within each of the sub-directories is a makefile for creating a library on a UNIX system. (You'll have to modify this file if you want to use the g++ compiler rather than the CC compiler). There is also a makefile for the sample programs called makeSamples. Run the command
make -f makeSamples
to create the sample programs.
If you are using a PC then you should create a project to generate a static library (.lib file). In the project include all of the .cpp files except the samples. (To see a list of exactly what files are needed, have a look at the UNIX makefile). You also need to specify the compiler define __STATIC__. There are two underscores in front and in back of the word STATIC. In the Borland 5.0 IDE this is done by inserting __STATIC__ in the Defines field accessed from Options\Project\Compiler\Defines. In the Visual C++ IDE this is done by inserting __STATIC__ in the Preprocessor Definitions accessed from Project\Settings\C/C++.
When using the classes, you need to make sure that your include path contains the directory where the class .h files reside.
Inflating the .zip files :
On UNIX systems: The command that I use to unzip them is
unzip -a -U -o xxx.zip
where xxx.zip is the .zip file. The -a option forces a conversion of CR LF to just LF, the -U option preserves the upper-case aspect of the file names, and the -o option allows overwriting of existing files.
On PC systems: One can use any of the wide number of unzip routines. You have to use a version of an unzip routine which supports long file names. I've been using the PKZIP for Windows 2.5 from PKWARE.