Как запустить программу hello world с vala и t cc vapi - PullRequest
2 голосов
/ 29 января 2020

код Vala

using TCC;
void main (string[] args) {
    State s = new State ();

    //  s.add_include_path ("/usr/lib/tcc/include");
    //  s.add_include_path ("/usr/include/");
    //  s.set_lib_path ("/usr/lib/tcc");

    s.compile_string ("""   extern int printf(char* c,...);
    int main () {
        printf("Hello world!\n");
        return 0;
    } """    );
    s.run ({ "" });
}

Ошибки при попытке запустить

❯ ./build/exec
tcc: error: library 'c' not found
tcc: error: file 'crtn.o' not found

dirstro: Arch
T CC версия: 0.9.27-3
Репозиторий воспроизвести: https://gitlab.com/gavr123456789/vala-ttc-example/tree/master

...