[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: |
Sat, 11 Apr 2009 01:06:39 +0200 |
User-agent: |
Thunderbird 1.5.0.10 (Windows/20070221) |
address@hidden wrote:
Thank you very much for your help.
Got the newest files from git (...manually - have problems with
tortoise-git)
Manually? There are links for snapshots (.zip / .tar.gz) on
http://repo.or.cz/w/tinycc.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
That looks wrong. If your tcc is correctly installed you don't
need any -I or -L. Follow the steps here:
http://lists.gnu.org/archive/html/tinycc-devel/2009-04/msg00036.html
Also are there special rules to compile libtcc.dll?
Well, it's possible but not supported currently.
What I do is:
tcc -Iinclude -Iinclude\sys -Iinclude\winapi -Isrc -Llib -shared
src/tcc-0.9.24/tcc.c -o libtcc.dll
in libtcc.h: prefix all prototypes with __declspec(dllexport),
such as
__declspec(dllexport) TCCState *tcc_new(void);
Then create a config.h. See build-tcc.bat as to how
(or just run it). You want to insert a full path for
CONFIG_TCCDIR (instead of ".")
To create the dll run:
tcc ../tcc.c -DLIBTCC -shared -o libtcc.dll
To create an import library for MSVC, run:
lib /out:libtcc.lib /DEF:libtcc.def
Thanks for all your help
fsw