TCC Win32
TCC Win32
TCC Win32
======
This file contains specific information for usage of TinyCC
under MS-Windows. See tcc-doc.html to have all the features.
* Alternatively you can compile TCC with just GCC from MinGW using
win32\build-tcc.bat
To install, copy the entire contents of the win32 directory to
where you want.
Examples:
---------
Open a console window (DOS box) and 'cd' to the examples directory.
For the 'Fibonacci' example type:
tcc fib.c
For the 'Hello Windows' GUI example type:
tcc hello_win.c
for the 'Hello DLL' example type
tcc -shared dll.c
tiny_impdef dll.dll (optional)
tcc hello_dll.c dll.def
Header Files:
-------------
The system header files (except _mingw.h) are from the MinGW
distribution:
http://www.mingw.org/
From the windows headers, only a minimal set is included. If you need
more, get MinGW's "w32api" package.
Resource Files:
---------------
TCC can link windows resources in coff format as generated by MinGW's
windres.exe. For example:
windres -O coff app.rc -o appres.o
tcc app.c appres.o -o app.exe
Tiny Libmaker:
--------------
The included tiny_libmaker tool by Timovj Lahde can be used as
'ar' replacement to make a library from several object files:
tiny_libmaker [rcs] library objectfiles ...
Limitations:
------------
- On the object file level, currently TCC supports only the ELF format,
not COFF as used by MinGW and MSVC. It is not possible to exchange
object files or libraries between TCC and these compilers. However
libraries for TCC from objects by TCC can be made using tiny_libmaker
or MinGW's ar.
- No leading underscore is generated in the ELF symbols.
- With DLLs, only functions (not data) can be im-/exported.
- Bounds checking (option -b) is not supported currently.
- 64-bit systems are not (yet) supported.
--- grischka