diff --git a/examples/c++/class.cpp b/examples/c++/class.cpp index 1ed51f7..bf5907f 100644 --- a/examples/c++/class.cpp +++ b/examples/c++/class.cpp @@ -9,7 +9,7 @@ See constructor.cpp in this directory for compilation instructions. Here is a transcript showing a test run under Linux using the GNU g++ compiler: - % g++ -shared -fPIC -I/usr/elk/include -c class.c -o class.so + % g++ -shared -fPIC -I/usr/include/elk class.cpp -o class.so -lelk % % scheme > (load 'class.so) diff --git a/examples/c++/constructor.cpp b/examples/c++/constructor.cpp index a2dc560..3f9b91e 100644 --- a/examples/c++/constructor.cpp +++ b/examples/c++/constructor.cpp @@ -5,9 +5,11 @@ are invoked by Elk when loading a compiled C++ file (when exiting). o Compile the shared object, for instance: - CC -pic -shared -I/usr/elk/include constructor.c -o constructor.so + CC -pic -shared -I/usr/elk/include constructor.cpp -o constructor.so -lelk - g++ -fPIC -shared -I/usr/include/elk constructor.c -o constructor.so + or: + + g++ -fPIC -shared -I/usr/include/elk constructor.ppc -o constructor.so -lelk o Now "(load 'constructor.so)", observe the "invoking constructor" message, and evaluate "(test)", which should return 3. Terminate the interpreter