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. Extract the files from "include"
96 into your "tcc/include/winapi" directory.
102 TCC can link windows resources in coff format as generated by MinGW's
103 windres.exe. For example:
105 windres -O coff app.rc -o appres.o
106 tcc app.c appres.o -o app.exe
112 The included tiny_libmaker tool by Timovj Lahde can be used as
113 'ar' replacement to make a library from several object files:
115 tiny_libmaker [rcs] library objectfiles ...
121 - On the object file level, currently TCC supports only the ELF format,
122 not COFF as used by MinGW and MSVC. It is not possible to exchange
123 object files or libraries between TCC and these compilers. However
124 libraries for TCC from objects by TCC can be made using tiny_libmaker
127 - No leading underscore is generated in the ELF symbols.
129 - With DLLs, only functions (not data) can be im-/exported.
131 - Bounds checking (option -b) is not supported currently.
133 - 64-bit systems are not (yet) supported.
137 Documentation and License:
138 --------------------------
139 TCC is distributed under the GNU Lesser General Public License. (See
140 COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
142 TinyCC homepage is at:
144 http://fabrice.bellard.free.fr/tcc/
148 WinAPI Help and 3rd-party tools:
149 --------------------------------
150 The Windows API documentation (Win95) in a single .hlp file is
151 available on the lcc-win32 site as "win32hlp.exe" or from other
152 locations as "win32hlp_big.zip".
154 A nice RAD tool to create windows resources (dialog boxes etc.) is
155 "ResEd", available at the RadASM website.