The libtcc library enables you to use TCC as a backend for dynamic code generation.
Read the `libtcc.h' to have an overview of the API. Read `libtcc_test.c' to have a very simple example.
The idea consists in giving a C string containing the program you want to compile directly to libtcc. Then you can access to any global symbol (function or variable) defined.
[^] # Re: tcc
Posté par Mildred (site web personnel) . En réponse au journal Auto-génération de code à la volée. Évalué à 6.
L'exemple : http://cvs.savannah.gnu.org/viewvc/tinycc/tinycc/libtcc_test(...)