TinyCC
======
This file contains specific information for usage of TinyCC
under MS-Windows. See tcc-doc.html to have all the features.
Installation from the binary ZIP package:
-----------------------------------------
Unzip the package to a directory of your choice.
Set the system PATH:
--------------------
To be able to invoke the compiler from everywhere on your computer by
just typing "tcc", please add the directory containing tcc.exe to your
system PATH.
Include and library search paths
--------------------------------
On windows, the standard "include" and "lib" directories are searched
relatively from the location of the executables (tcc.exe, libtcc.dll).
Examples:
---------
Open a console window (DOS box) and 'cd' to the examples directory.
For the 'Fibonacci' example type:
tcc fib.c
For the 'Hello Windows' GUI example type:
tcc hello_win.c
For the 'Hello DLL' example type
tcc -shared dll.c
tcc -impdef dll.dll (optional)
tcc hello_dll.c dll.def
Using libtcc as JIT compiler in your program
--------------------------------------------
Check out the 'libtcc_test' example:
- Running it from source:
tcc -I libtcc libtcc/libtcc.def -run examples/libtcc_test.c
- Compiling with TCC:
tcc examples/libtcc_test.c -I libtcc libtcc/libtcc.def
- Compiling with MinGW:
gcc examples/libtcc_test.c -I libtcc libtcc.dll -o libtcc_test.exe
- Compiling with MSVC:
lib /def:libtcc\libtcc.def /out:libtcc.lib
cl /MD examples/libtcc_test.c -I libtcc libtcc.lib
Import Definition Files:
------------------------
To link with Windows system DLLs, TCC uses import definition
files (.def) instead of libraries.
The now built-in 'tiny_impdef' program may be used to make
additional .def files for any DLL. For example
tcc -impdef [-v] opengl32.dll [-o opengl32.def]
Put opengl32.def into the tcc/lib directory. Specify -lopengl32 at
the TCC commandline to link a program that uses opengl32.dll.
Header Files:
-------------
The system header files (except _mingw.h) are from the MinGW
distribution:
http://www.mingw.org/
From the windows headers, only a minimal set is included. If you need
more, get MinGW's "w32api" package. Extract the files from "include"
into your "tcc/include/winapi" directory.
Resource Files:
---------------
TCC can link windows resources in coff format as generated by MinGW's
windres.exe. For example:
windres -O coff app.rc -o appres.o
tcc app.c appres.o -o app.exe
Tiny Libmaker:
--------------
The now built-in tiny_libmaker tool by Timovj Lahde can be used as
'ar' replacement to make a library from several object files:
tcc -ar [rcsv] library objectfiles ...
Compilation from source:
------------------------
* You can use the MinGW and MSYS tools available at
http://www.mingw.org
http://www.mingw-w64.org
http://www.msys2.org
Untar the TCC archive and type in the MSYS shell:
./configure [--prefix installpath]
make
make install
The default install location is c:\Program Files\tcc
Cygwin can be used too with its mingw cross-compiler installed:
./configure --cross-prefix=i686-w64-mingw32-
(the prefix may vary)
* Alternatively you can compile TCC with just GCC from MinGW using
> build-tcc.bat (from the win32 directory)
Also MSVC can be used with the "VSTools Developer Command Prompt":
> build-tcc.bat -c cl
or with an existing tcc (needs to be in a different directory)
> build-tcc.bat -c some-tcc-dir\tcc.exe
Also you can copy/install everything into another directory:
> build-tcc.bat -i <dir>
Limitations:
------------
- On the object file level, currently TCC supports only the ELF format,
not COFF as used by MinGW and MSVC. It is not possible to exchange
object files or libraries between TCC and these compilers.
However libraries for TCC from objects by TCC can be made using
tcc -ar lib.a files.o ,,,
- No leading underscore is generated in the ELF symbols.
Documentation and License:
--------------------------
TCC is distributed under the GNU Lesser General Public License. (See
COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
TinyCC homepage is at:
http://fabrice.bellard.free.fr/tcc/
WinAPI Help and 3rd-party tools:
--------------------------------
The Windows API documentation (Win95) in a single .hlp file is
available on the lcc-win32 site as "win32hlp.exe" or from other
locations as "win32hlp_big.zip".
A nice RAD tool to create windows resources (dialog boxes etc.) is
"ResEd", available at the RadASM website.
--- grischka
没有合适的资源?快使用搜索试试~ 我知道了~
Windows下TCC和GCC编译工具链
共104个文件
h:82个
c:6个
def:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 73 浏览量
2022-03-17
14:06:22
上传
评论
收藏 3.15MB ZIP 举报
温馨提示
Windows下TCC和GCC编译工具链
资源推荐
资源详情
资源评论
收起资源包目录
Windows下TCC和GCC编译工具链 (104个子文件)
libtcc1-64.a 41KB
libtcc1-32.a 26KB
hello_win.c 4KB
libtcc_test.c 2KB
hello_dll.c 440B
fib.c 343B
dll.c 340B
hello.c 74B
msvcrt.def 16KB
kernel32.def 13KB
user32.def 10KB
gdi32.def 5KB
libtcc.def 547B
libtcc.dll 153KB
i386-win32-tcc.exe 152KB
mingw-get-setup.exe 91KB
tcc.exe 23KB
winnt.h 188KB
winuser.h 175KB
winbase.h 156KB
winerror.h 147KB
wingdi.h 118KB
wchar.h 33KB
tchar.h 31KB
math.h 22KB
stdlib.h 20KB
stdio.h 15KB
wincon.h 14KB
winreg.h 14KB
io.h 13KB
stdio_s.h 11KB
conio.h 11KB
ctype.h 10KB
process.h 9KB
string.h 8KB
time.h 8KB
tchar_s.h 8KB
wchar_s.h 7KB
stat.h 7KB
stdint.h 6KB
inttypes.h 6KB
tcc_libm.h 6KB
windef.h 6KB
basetsd.h 5KB
winver.h 5KB
malloc.h 5KB
wctype.h 5KB
guiddef.h 4KB
stdlib_s.h 4KB
setjmp.h 4KB
_mingw.h 4KB
excpt.h 4KB
mbstring_s.h 4KB
utime.h 3KB
dirent.h 3KB
libtcc.h 3KB
fenv.h 3KB
limits.h 3KB
tcclib.h 3KB
stdarg.h 2KB
timeb.h 2KB
basetyps.h 2KB
time_s.h 2KB
windows.h 2KB
locale.h 2KB
types.h 2KB
direct.h 2KB
string_s.h 2KB
time.h 2KB
signal.h 2KB
conio_s.h 1KB
assert.h 1KB
errno.h 1KB
stddef.h 1KB
float.h 1KB
fcntl.h 1KB
memory.h 1KB
dos.h 1KB
dir.h 952B
io_s.h 881B
stralign_s.h 824B
search_s.h 796B
timeb_s.h 653B
locking.h 648B
share.h 639B
crtdbg_s.h 461B
file.h 367B
fcntl.h 359B
varargs.h 355B
unistd.h 351B
mem.h 345B
vadefs.h 304B
pshpack4.h 285B
pshpack1.h 285B
pshpack8.h 285B
pshpack2.h 285B
poppack.h 282B
stdbool.h 176B
values.h 126B
tcc-doc.html 70KB
共 104 条
- 1
- 2
资源评论
爱学习的萝卜头
- 粉丝: 4
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功