generic way to access C++ libs?

Gabriel Zachmann zach at cs.uni-bonn.de
Fri Nov 5 19:04:14 CET 2004


>  C++ has no concept of runtime type information (except from saying "this
>  is
>  of class X). This sort of information is known as "reflection" in java
>  or

let's assume we have a well-populatyed symbol table in the lib
(which is usually the case, or, at least, not too hard a restriction).

>  So to answer your question: Its not possible. There are other reasons as
>  well: C++ defines no binary layout of objects, the result is that a lib
>  complied  with different compilers (gcc, intel, msvc) results in
>  incompatible binaries. So even if one would ship the lib with the header

that's not quite true.
actually, each platform (wintel, linux, ...) has a pretty well-defined
object file format (ELF under unix/linux, for instance).
current icc/linux and gcc/g++ work pretty well together in most cases, and
icc/windows and cl, too.

It is well understood that the envisioned python module would have to be
platform-specific.


Best regards,
gabriel.


-- 
/-------------------------------------------------------------------------\
| There are works which wait,                                             |
| and which one does not understand for a long time; [...]                |
| for the question often arrives a terribly long time after the answer.   |
|                                                         (Oscar Wilde)   |
+-------------------------------------------------------------------------+
| zach at cs.uni-bonn.de            __@/'        www.gabrielzachmann.org     |
\-------------------------------------------------------------------------/



More information about the Python-list mailing list