5 This file contains specific information for usage of TinyCC
6 under MS-Windows. See tcc-doc.html to have all the features.
10 Installation from the binary ZIP package:
11 -----------------------------------------
12 Unzip the package to a directory of your choice.
18 To be able to invoke the compiler from everywhere on your computer by
19 just typing "tcc", please add the directory containing tcc.exe to your
26 Open a console window (DOS box) and 'cd' to the examples directory.
28 For the 'Fibonacci' example type:
32 For the 'Hello Windows' GUI example type:
36 For the 'Hello DLL' example type
39 tiny_impdef dll.dll (optional)
40 tcc hello_dll.c dll.def
42 For the 'libtcc_test' example type
44 tcc examples/libtcc_test.c -I libtcc -L libtcc -ltcc
47 Import Definition Files:
48 ------------------------
49 To link with Windows system DLLs, TCC uses import definition
50 files (.def) instead of libraries.
52 The included 'tiny_impdef' program may be used to make additional
53 .def files for any DLL. For example:
55 tiny_impdef.exe opengl32.dll
57 Put opengl32.def into the tcc/lib directory. Specify -lopengl32 at
58 the TCC commandline to link a program that uses opengl32.dll.
64 The system header files (except _mingw.h) are from the MinGW
69 From the windows headers, only a minimal set is included. If you need
70 more, get MinGW's "w32api" package. Extract the files from "include"
71 into your "tcc/include/winapi" directory.
77 TCC can link windows resources in coff format as generated by MinGW's
78 windres.exe. For example:
80 windres -O coff app.rc -o appres.o
81 tcc app.c appres.o -o app.exe
87 The included tiny_libmaker tool by Timovj Lahde can be used as
88 'ar' replacement to make a library from several object files:
90 tiny_libmaker [rcs] library objectfiles ...
94 Compilation from source:
95 ------------------------
96 * You can use the MinGW and MSYS tools available at
100 Untar the TCC archive and type in the MSYS shell:
106 The default install location is c:\Program Files\tcc
109 * Alternatively you can compile TCC with just GCC from MinGW using
113 To install, copy the entire contents of the win32 directory to
120 - On the object file level, currently TCC supports only the ELF format,
121 not COFF as used by MinGW and MSVC. It is not possible to exchange
122 object files or libraries between TCC and these compilers. However
123 libraries for TCC from objects by TCC can be made using tiny_libmaker
126 - No leading underscore is generated in the ELF symbols.
128 - Bounds checking (option -b) is not supported on 64-bit OS.
132 Documentation and License:
133 --------------------------
134 TCC is distributed under the GNU Lesser General Public License. (See
135 COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
137 TinyCC homepage is at:
139 http://fabrice.bellard.free.fr/tcc/
143 WinAPI Help and 3rd-party tools:
144 --------------------------------
145 The Windows API documentation (Win95) in a single .hlp file is
146 available on the lcc-win32 site as "win32hlp.exe" or from other
147 locations as "win32hlp_big.zip".
149 A nice RAD tool to create windows resources (dialog boxes etc.) is
150 "ResEd", available at the RadASM website.