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.
38 (Note that the binary package does not include libtcc. If you
39 want TCC as dynamic code generator, please use the source code
46 To be able to invoke the compiler from everywhere on your computer by
47 just typing "tcc", please add the directory containing tcc.exe to your
54 Open a console window (DOS box) and 'cd' to the examples directory.
56 For the 'Fibonacci' example type:
60 For the 'Hello Windows' GUI example type:
64 for the 'Hello DLL' example type
67 tiny_impdef dll.dll (optional)
68 tcc hello_dll.c dll.def
72 Import Definition Files:
73 ------------------------
74 To link with Windows system DLLs, TCC uses import definition
75 files (.def) instead of libraries.
77 The included 'tiny_impdef' program may be used to make additional
78 .def files for any DLL. For example:
80 tiny_impdef.exe opengl32.dll
82 Put opengl32.def into the tcc/lib directory. Specify -lopengl32 at
83 the TCC commandline to link a program that uses opengl32.dll.
89 The system header files (except _mingw.h) are from the MinGW
94 From the windows headers, only a minimal set is included. If you need
95 more, get MinGW's "w32api" package.
101 TCC can link windows resources in coff format as generated by MinGW's
102 windres.exe. For example:
104 windres -O coff app.rc -o appres.o
105 tcc app.c appres.o -o app.exe
111 The included tiny_libmaker tool by Timovj Lahde can be used as
112 'ar' replacement to make a library from several object files:
114 tiny_libmaker [rcs] library objectfiles ...
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 - With DLLs, only functions (not data) can be im-/exported.
130 - Bounds checking (option -b) is not supported currently.
132 - 64-bit systems are not (yet) supported.
136 Documentation and License:
137 --------------------------
138 TCC is distributed under the GNU Lesser General Public License. (See
139 COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
141 TinyCC homepage is at:
143 http://fabrice.bellard.free.fr/tcc/
147 WinAPI Help and 3rd-party tools:
148 --------------------------------
149 The Windows API documentation (Win95) in a single .hlp file is
150 available on the lcc-win32 site as "win32hlp.exe" or from other
151 locations as "win32hlp_big.zip".
153 A nice RAD tool to create windows resources (dialog boxes etc.) is
154 "ResEd", available at the RadASM website.