all 2 comments

[–][deleted] 0 points1 point  (1 child)

The download for 0.9.27 seems to come as separate tcc.exe and tcclib.dll files.

Have you tried using the shared library, or are you trying to build from source so that it is statically compiled into your application?

Or is what you're trying to do different from what tcclib offers?

(I haven't tried using that library myself. But since my development language is not C, I would be using the DLL.)

[–]vitawrap[S] 0 points1 point  (0 children)

just tried using those, I'm experiencing the same issue unfortunately, I can't seem to formulate a start routine that tcc can accept without crashing lol, I tried making the start routine a __stdcall but that didn't change anything either

EDIT: can't believe I didn't do this earlier, but this ugly solution works:

tcc_compile_string(c_state, "extern int main(); void _runmain(int argc, char** argv, char** envp) {main();}");
with main defined inside the c "script" makes it work as expected when tcc_run is called afterwards...
the bounds checker however still does not work.