Compiling and Linking your C++ Program

C++ setup

Building the C++ demo program

When you installed Cantera, a script named "ctnew" was added to the bin directory within the Cantera installation directory. This script generates a demo C++ program and a Makefile to build it that is already configured correctly for your system. If you have run setup_cantera, then the bin directory should be on your PATH, so you can just type

ctnew

After ctnew runs, you will find two new files in the current directory: demo.cpp and demo.mak. To build the demo, type

make -f demo.mak

To run the demo, type:

./demo

Building your application

To build your own C++ program, simply replace demo.o in the list of object files near the top of demo.mak with the object files for your application. You may want to rename demo.mak to Makefile or some other name. Now you should be able to simply type "make" to build your application!

Generated by  doxygen 1.6.3