aboutsummaryrefslogtreecommitdiff
path: root/inheritance
diff options
context:
space:
mode:
Diffstat (limited to 'inheritance')
-rw-r--r--inheritance/polymorphism/README9
-rw-r--r--inheritance/reuse/README8
2 files changed, 17 insertions, 0 deletions
diff --git a/inheritance/polymorphism/README b/inheritance/polymorphism/README
index 4fb3e15..8a013b3 100644
--- a/inheritance/polymorphism/README
+++ b/inheritance/polymorphism/README
@@ -53,6 +53,15 @@ driver.cxx
each object. Finally, the driver erases the state of the persistent
objects from the database, again using the base class interface.
+To compile and link the example manually from the command line we can use
+the following commands (using MySQL as an example; replace 'c++' with your
+C++ compiler name):
+
+c++ -c employee.cxx
+c++ -c employee-odb.cxx
+c++ -DDATABASE_MYSQL -c driver.cxx
+c++ -o driver driver.o employee.o employee-odb.o -lodb-mysql -lodb
+
To run the example we may first need to create the database schema (for some
database systems, such as SQLite, the schema is embedded into the generated
code which makes this step unnecessary). Using MySQL as an example, this
diff --git a/inheritance/reuse/README b/inheritance/reuse/README
index 8cba573..53e0d90 100644
--- a/inheritance/reuse/README
+++ b/inheritance/reuse/README
@@ -45,6 +45,14 @@ driver.cxx
performs a database query which uses a data member from the base class
in its criterion.
+To compile and link the example manually from the command line we can use
+the following commands (using MySQL as an example; replace 'c++' with your
+C++ compiler name):
+
+c++ -c employee-odb.cxx
+c++ -DDATABASE_MYSQL -c driver.cxx
+c++ -o driver driver.o employee-odb.o -lodb-mysql -lodb
+
To run the example we may first need to create the database schema (for some
database systems, such as SQLite, the schema is embedded into the generated
code which makes this step unnecessary). Using MySQL as an example, this