Re: C Libraries/Wrappers

new topic     » goto parent     » topic index » view thread      » older message » newer message
Icy_Viking said...

Also, when the next release has supports for structs, would it be easier or possible to wrap CPlusPlus libraries?

Unfortunately, the ability to interface with C++ goes well beyond structs. If that were the only boundary, we could be doing it today with manual peek/poke calls.

You'll have to contend with compiler-specific name mangling and other ABI differences like class constructors, polymorphism, exceptions, and so on.

Here's an article on how the D language accomplishes this: Interfacing to C++. They have to make a few assumptions and concessions, and even then they already have a compatible OOP syntax that mirrors C++ directly.

Matt had made some headway with doing this manually in the earliest versions of wxEuphoria, but he eventually moved to a more maintainable shim library approach instead.

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu