readme.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. TinyCC
  2. ======
  3. This file contains some additional information for usage of TinyCC
  4. under MS-Windows:
  5. Overview:
  6. ---------
  7. TinyCC (aka TCC) is a small but hyperfast C compiler, written by
  8. Fabrice Bellard.
  9. TinyCC for MS-Windows can produce console applications, native
  10. windows GUI programs and DLL's.
  11. The package with under 300kb includes a complete C-compiler with
  12. header files and basic system library support.
  13. With the -run switch you can run C-sources without any linking
  14. directly from the command line.
  15. TinyCC can be used as dynamic code generator library in your own
  16. program.
  17. TinyCC can of course compile itself.
  18. Compilation: (omit that if you use the binary ZIP package)
  19. ------------
  20. You can use the MinGW and MSYS tools available at
  21. http://www.mingw.org to compile TCC for Windows. Untar the TCC
  22. archive and type in the MSYS shell:
  23. ./configure
  24. make
  25. make install
  26. TCC is installed in c:\Program Files\tcc
  27. Alternatively you can use win32\build-tcc.bat to compile TCC
  28. with just gcc and ar from MINGW. To install, copy the entire
  29. contents of the win32 directory to where you want.
  30. Installation: (from the binary ZIP package)
  31. -------------
  32. Just unzip the package to a directory anywhere on your computer.
  33. The binary package does not include libtcc. If you want tcc as
  34. dynamic code generator, please use the source code distribution.
  35. Examples:
  36. ---------
  37. For the 'Fibonacci' console example type from the command line:
  38. tcc examples\fib.c
  39. For the 'Hello Windows' GUI example:
  40. tcc examples\hello_win.c
  41. For the 'Hello DLL' example:
  42. tcc -shared examples\dll.c
  43. tcc examples\hello_dll.c examples\dll.def
  44. Import Definition Files:
  45. ------------------------
  46. To link with Windows system DLLs, TinyCC uses import definition
  47. files (.def) instead of libraries.
  48. The included 'tiny_impdef' program may be used to make additional
  49. .def files for any DLL. For example:
  50. tiny_impdef.exe opengl32.dll
  51. To use it, put the opengl32.def file into the tcc/lib directory,
  52. and specify -lopengl32 at the tcc commandline.
  53. Resource Files:
  54. ---------------
  55. TinyCC-PE can now link windows resources in coff format as generated
  56. by MINGW's windres.exe. For example:
  57. windres -O coff app.rc -o appres.o
  58. tcc app.c appres.o -o app.exe
  59. Tiny Libmaker:
  60. --------------
  61. The included tiny_libmaker tool by Timovj Lahde can be used as
  62. 'ar' replacement to make a library from several object files.
  63. Header Files:
  64. -------------
  65. The system header files (except _mingw.h) are from the mingw
  66. distribution (http://www.mingw.org/).
  67. Documentation and License:
  68. --------------------------
  69. TCC is distributed under the GNU Lesser General Public License
  70. (see COPYING file).
  71. Please read tcc-doc.html to have all the features of TCC. Also
  72. visit: http://fabrice.bellard.free.fr/tcc/
  73. -- [email protected]