[Mono-list] Thunk generator

Robert Jordan robertj at gmx.net
Fri Nov 13 12:54:09 UTC 2015


On 13.11.2015 13:24, Evgeny Pirogov wrote:
> Hello, Robert Jordan.
>
> Look like your utility make c++ code on the fly. Is it only generate .h
> files? Where code for C++ generation located in the project?

It generates both C/C++ and H files but not on the fly.
You have to generate the thunks in advance.

The code is in this project:

https://github.com/robert-j/Mono.Embedding/tree/master/Mono.Embedding.ThunkTool

in Program.cs. It's basic reflection stuff.

You can see it in action when you compile the whole solution
and run it on Mono.Embedding.dll [1].


Robert

[1] The Mono.Embedding assembly is providing APIs missing from
Mono's native embedding APIs (generics & implementing
delegates in C/C++).




More information about the Mono-list mailing list