Cantera / cantera-website

Official Cantera Website
https://cantera.org
Other
15 stars 26 forks source link

Update C++ tutorial and very simple C++ program #191

Closed ischoegl closed 2 years ago

ischoegl commented 2 years ago

The very simple C++ program should be updated to use newSolution.

More importantly, no longer having setup_cantera scripts (see Cantera/enhancements#135) may require some additional steps (example: PKG_CONFIG_PATH needs to be set)

speth commented 2 years ago

That example gives an explicit compiler command demonstrating the use of the -L and -I flags to point to the Cantera library and header file locations, and as such does not rely on setup_cantera or pkg-config at all. Assuming that command line is modified correctly for the user's system, I think it should work fine, with the caveats that are already mentioned in the example, e.g. that the set of libraries to link to depends on how Cantera was built.

ischoegl commented 2 years ago

Now that I have things working, I can add the following about the Compiling C++ Programs tutorial:

In the past, PKG_CONFIG_PATH and LD_LIBRARY_PATH were set/updated by setup_cantera, so I think there is a link to Cantera/enhancements#135