1. c++ cod

Can any one tell me a good way to call routines and code I write in CPlusPlus files from euphoria scripts?

In the cxx file, my functions wouldnt export until I put the functions in an extern "C" {...} block and then that seemed to work with gcc in debian.

Does this work in general, or is there a better way?

new topic     » topic index » view message » categorize

2. Re: c++ cod

luk321 said...

Can any one tell me a good way to call routines and code I write in CPlusPlus files from euphoria scripts?

In the cxx file, my functions wouldnt export until I put the functions in an extern "C" {...} block and then that seemed to work with gcc in debian.

Does this work in general, or is there a better way?

In general, yes. Each C++ compiler uses its own name mangling scheme. For wxEuphoria, I used to track the mangling for the compilers on different platforms. Now, I wrap the wxWidgets C++ calls with my own library and export the functions as extern "C", and it's much easier (except that I have to distribute my own library to wrap wxWidgets).

Matt

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu