[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] using tcc as a cross compiler for Windows
From: |
grischka |
Subject: |
Re: [Tinycc-devel] using tcc as a cross compiler for Windows |
Date: |
Tue, 16 Feb 2010 17:16:59 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (Windows/20090812) |
Luigi Rizzo wrote:
windows system dlls are not necessary for compilation.
they seem definitely necessary for linking though, see below:
No. All you need is the win32/lib/*.def files. It just happens to
work with *.dll too (since only recently btw).
Taking a random c program, . is the directory with tcc sources
compiled as above, and libtcc1.a :
libtcc1.a needs to be in win32/lib (of course)
> ./tcc -Bwin32 -L . ~/c-src/card.c
In file included from /home/luigi/c-src/card.c:44:
In file included from win32/include/stdio.h:9:
win32/include/_mingw.h:21: error: include file 'stddef.h' not found
tcc/include/* needs to be copied to tcc/win32/include (see Makefile or
build-tcc.bat).
> ./tcc -Iwin32 -Iwin32/include ~/c-src/card.c -L . -L ../win-bin/
this works fine
Surely works. But is horribly redundant ;)
Basically with CONFIG_TCCDIR set correctly (and with i386-win32-tcc
installed) all you need (and ever should need) is:
$ cd win32/examples
$ i386-win32-tcc hello_win.c
This produces hello_win.exe that can be run on windows or under wine.
--- grischka