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: Sat, 11 Apr 2009 12:47:35 -0700
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

grischka wrote:
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
The problem is that the zipped file has not the latest changes, but the files are dated December 2008. You said your libtcc example works with current, so I tried to get the current files.

Git in general seems not to be very Windows friendly, can't get TortoiseGIT to download anything...


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


Thanks will look into this.


Also are there special rules to compile libtcc.dll?

Well, it's possible but not supported currently.

Would be nice if everything that belongs to the tcc package would be compilable out of the "source code" box.


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


Will try to get this to work too, thanks.

Thanks for all your help.
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]