5 This file contains specific information for usage of TinyCC
6 under MS-Windows. See tcc-doc.html to have all the features.
10 Compilation from source:
11 ------------------------
12 * You can use the MinGW and MSYS tools available at
16 Untar the TCC archive and type in the MSYS shell:
22 The default install location is c:\Program Files\tcc
25 * Alternatively you can compile TCC with just GCC from MinGW using
29 To install, copy the entire contents of the win32 directory to
34 Installation from the binary ZIP package:
35 -----------------------------------------
36 Unzip the package to a directory of your choice.
41 To be able to invoke the compiler from everywhere on your computer by
42 just typing "tcc", please add the directory containing tcc.exe to your
49 Open a console window (DOS box) and 'cd' to the examples directory.
51 For the 'Fibonacci' example type:
55 For the 'Hello Windows' GUI example type:
59 For the 'Hello DLL' example type
62 tiny_impdef dll.dll (optional)
63 tcc hello_dll.c dll.def
65 For the 'libtcc_test' example type
67 tcc examples/libtcc_test.c -I libtcc -L libtcc -ltcc
70 Import Definition Files:
71 ------------------------
72 To link with Windows system DLLs, TCC uses import definition
73 files (.def) instead of libraries.
75 The included 'tiny_impdef' program may be used to make additional
76 .def files for any DLL. For example:
78 tiny_impdef.exe opengl32.dll
80 Put opengl32.def into the tcc/lib directory. Specify -lopengl32 at
81 the TCC commandline to link a program that uses opengl32.dll.
87 The system header files (except _mingw.h) are from the MinGW
92 From the windows headers, only a minimal set is included. If you need
93 more, get MinGW's "w32api" package. Extract the files from "include"
94 into your "tcc/include/winapi" directory.
100 TCC can link windows resources in coff format as generated by MinGW's
101 windres.exe. For example:
103 windres -O coff app.rc -o appres.o
104 tcc app.c appres.o -o app.exe
110 The included tiny_libmaker tool by Timovj Lahde can be used as
111 'ar' replacement to make a library from several object files:
113 tiny_libmaker [rcs] library objectfiles ...
119 - On the object file level, currently TCC supports only the ELF format,
120 not COFF as used by MinGW and MSVC. It is not possible to exchange
121 object files or libraries between TCC and these compilers. However
122 libraries for TCC from objects by TCC can be made using tiny_libmaker
125 - No leading underscore is generated in the ELF symbols.
127 - With DLLs, only functions (not data) can be im-/exported.
129 - Bounds checking (option -b) is not supported currently.
131 - 64-bit systems are not (yet) supported.
135 Documentation and License:
136 --------------------------
137 TCC is distributed under the GNU Lesser General Public License. (See
138 COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
140 TinyCC homepage is at:
142 http://fabrice.bellard.free.fr/tcc/
146 WinAPI Help and 3rd-party tools:
147 --------------------------------
148 The Windows API documentation (Win95) in a single .hlp file is
149 available on the lcc-win32 site as "win32hlp.exe" or from other
150 locations as "win32hlp_big.zip".
152 A nice RAD tool to create windows resources (dialog boxes etc.) is
153 "ResEd", available at the RadASM website.