tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] libtcc problems


From: fsw . fb
Subject: Re: [Tinycc-devel] libtcc problems
Date: Fri, 10 Apr 2009 21:05:10 +0000 (UTC)

Thank you very much for your help.

Got the newest files from git (...manually - have problems with tortoise-git) but tcc doesn't compile, it says:

tcc: undefined symbol '__ashldi3'
tcc: undefined symbol '__lshrdi3'
tcc: undefined symbol '__ashrdi3'
tcc: undefined symbol '__floatundixf'

Maybe my setup is wrong (seems to be something for arm...).

I try to compile tcc with:
tcc -Iinclude -Iinclude\sys -Iinclude\winapi -Isrc -Llib src\tcc-0.9.24\tcc.c -o tcc-new.exe


Also are there special rules to compile libtcc.dll?

What I do is:
tcc -Iinclude -Iinclude\sys -Iinclude\winapi -Isrc -Llib -shared src/tcc-0.9.24/tcc.c -o libtcc.dll


Thanks for all your help
fsw



----- Original Message -----
From: "grischka" <address@hidden>
To: address@hidden
Sent: Friday, April 10, 2009 6:56:13 AM GMT -08:00 US/Canada Pacific
Subject: Re: [Tinycc-devel] libtcc problems

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


_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]