#include #include #include const char *files[] = { "test.c", "test2.c", NULL }; int main(int argc, char **argv) { TCCState *s = tcc_new(); int (*start)(void); tcc_set_output_type(s, TCC_OUTPUT_MEMORY); for (int i = 0; files[i]; i++) { if (tcc_add_file(s, files[i])) { printf("oof, press f, failed to compile %s.\n", files[i]); return 1; } } start = tcc_get_symbol(s, "start"); int ret = start(); return 0; }