I recently tried linking pop11 to C++ to make use of a nice C++
interface I have for gnuplot. However, although I managed to get pop11
to load up C objects and call C functions - it fails completely if these
functions make use of the C++ standard libraries.
Does anyone know if there's an (easy) way to fix this (its not
desperately important for me that it works)?
I also tried loading up the C++ standard libraries but POP11 doesn't
seem to like the format. I assume the problem is that POP11 can only
import object files with C name mangling which I guess the C++ object
files don't have.
If I try to load the C++ stanard objects I get lots of errors of the
sort:
;;; Warning - ld.so.1: pop11: fatal: relocation error: file
./iostream.so: symbol get__7istreamPcic: referenced symbol not found
and then
;;; Error - ld.so.1: pop11: fatal: hello: can't find symbol
;;; MISHAP - ERRORS ACCESSING EXTERNAL SYMBOLS (see above)
;;; FILE : /scratch/pg/sir/cppio/test.p LINE NUMBER: 80
;;; DOING : external_do_load exload trycompile
--
exload 'test2'
['test.so', ;;;A program with a C interface that calls C++ fns
'iostream.so',
.
. lots of other C++ libraries
.
]
(language C)
c_hello():void <- hello ;;; makes use of C++ streams
endexload;
exacc c_hello();
--
Stuart.
PS. What's the difference between a .o and .so file? (I tried various
combinations with different file names)
|