Switch to newer tccpe.c (includes support for resources)
[tinycc/daniel.git] / win32 / readme.txt
blobc453a696173bd85bae3d8724f24baed36bce53f6
2     TinyCC-PE
3     ---------
5     TinyCC (aka TCC) is a small but hyperfast C compiler,
6     written by Fabrice Bellard,
9     TinyCC-PE is the TinyCC compiler with an extension to
10     write PE executables for MS-Windows.
13     Features:
14     ---------
16     TinyCC-PE can produce console applications, native windows
17     GUI programs and DLL's.
19     Most of the features pointed out by Fabrice Bellard for the
20     original version are still valid, i.e:
22     - SMALL! The package with ~400kb includes a complete C-compiler
23       with header files for console and GUI applications.
25     - With the -run switch you can run C-sources without any
26       linking directly from the command line.
28     - TCC can of course compile itself.
31     Compilation:  (omit that if you use the binary ZIP package)
32     ------------
33     
34     You must use the MinGW and MSYS tools available at
35     http://www.mingw.org to compile TCC for Windows. Untar the TCC
36     archive and type in the MSYS shell:
37     
38        ./configure
39        make
40        make install 
42        TCC is installed in c:\Program Files\tcc
44     Alternatively you can use win32\build-tcc.bat to compile TCC
45     with just gcc and ar from MINGW. To install, copy the entire
46     contents of the win32 directory to where you want.
49     Installation: (from the binary ZIP package)
50     -------------
52     Just unzip the package to a directory anywhere on your computer.
55     Examples:
56     ---------
58     For the 'Fibonacci' console example type from the command line:
60         tcc examples\fib.c
62     For the 'Hello Windows' GUI example:
64         tcc examples\hello_win.c
66     For the 'Hello DLL' example:
68         tcc -shared examples\dll.c
69         tcc examples\hello_dll.c examples\dll.def
72     Import Definitions:
73     -------------------
75     TinyCC-PE searches and reads import definition files similar
76     to libraries.
78     The included 'tiny_impdef' program may be used to make .def files
79     for any DLL, e.g for an 'opengl32.def':
81         tiny_impdef.exe opengl32.dll
83     or to the same effect:
85         tcc -run tiny_impdef.c opengl32.dll
88     Resource Files:
89     ---------------
91     TinyCC-PE can now link windows resources in coff format as generated
92     by MINGW's windres.exe. For example:
94         windres -O coff app.rc -o appres.o
95         tcc app.c appres.o -o app.exe
98     Header Files:
99     -------------
101     The system header files, except '_mingw.h', are from the
102     3.7 mingw distribution. See also: http://www.mingw.org/
105     Compile TCC:
106     ------------
108     With TCC itself just say:
110         tcc src\tcc.c -o tcc.new.exe
112     Other compilers like mingw-gcc or msvc work as well.
113     To make libtcc1.a, you need 'ar' from the mingw binutils.
116     Documentation and License:
117     --------------------------
119     TCC is distributed under the GNU Lesser General Public License
120     (see COPYING file).
122     Please read the original tcc-doc.html to have all the features
123     of TCC. Also visit: http://fabrice.bellard.free.fr/tcc/
125     --
126     grischka@users.sourceforge.net