* Fixed build instructions for the C++ examples.
git-svn-id: svn://svn.zoy.org/elk/trunk@52 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
parent
f8879485af
commit
9eac8f53ec
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue