[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] libtcc problems
From: |
grischka |
Subject: |
Re: [Tinycc-devel] libtcc problems |
Date: |
Fri, 10 Apr 2009 15:56:13 +0200 |
User-agent: |
Thunderbird 1.5.0.10 (Windows/20070221) |
address@hidden wrote:
Hello,
Looking at the libtcc.h file libtcc should be able to compile to an
output file instead of memory.
Wanted to experiment using libtcc.dll as a backend for another program.
With anything I try I get several errors, the file /usr/lib/crtn.o was
not found etc.
Also tcc_add_library_path and tcc_add_library don't seem to have any effect.
I'm on Windows, so why is the compiler looking for /usr/lib ?
Bug. http://repo.or.cz/w/tinycc.git?a=commitdiff;h=96bd8f2b
Where to set the TCC_OUTPUT_FORMAT ?
Nowhere. It is PE for EXE/DLL and ELF for OBJ.
Has somebody a working example on Windows?
(maybe utilizing all libtcc commands...)
This works with current from http://repo.or.cz/w/tinycc.git
#include "libtcc.h"
int main()
{
TCCState *s;
s = tcc_new();
tcc_set_output_type(s, TCC_OUTPUT_EXE);
tcc_compile_string(s, "#include <stdio.h>\n");
tcc_compile_string(s, "int main(){puts(\"Hello!\");return 0;}");
tcc_output_file(s, "hello.exe");
tcc_delete(s);
return 0;
}
Thanks
fsw