This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dynamic Loading of classes in C++ without knowing their interface


Tim Jansen wrote:

On Wednesday 07 May 2003 05:11, Gianni Mariani wrote:


Doesn't SWIG make it possible to create a binary that allows an
application (perl/python) to call a C++ API without the app knowing how
to use it at it's compile-time ?



SWIG requires a interface description file, it does not allow you to access C++ APIs without writing (and maintaining) one.


bye...


Can the compiler (g++) be taught to create such a file ?

If so, can't such description be stored in the object ?

If so, can't one create an generalized foreign class interface ?

I think these concepts are best supported by the compiler since it has complete knowledge of what you need to do to create such a foreign class interface. libffi could also be supported by the compiler as well if the compiler could be taught to create interface descrriptions.

The other concept I've toyed with is to (- heaven forbid -) invoke the compiler in a just-in-time kind of way in a quasi interpreted language, still you need to match interpreter language constructs with that of the foreign language you're attaching to. Which then bring you back to the point of an interface description file.

So, what is it again you're trying to solve ?

G


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]