




全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
TinyCC = This file contains specific information for usage of TinyCC under MS-Windows. See tcc-doc.html to have all the features.该文件包含在MS-Windows下使用TinyCC的特定信息,查看文档tcc-doc.html了解更多功能. Installation from the binary ZIP package:从二进制ZIP包安装: - 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.为了在你的计算机中任何地方键入tcc即可调用编译器,请将tcc.exe的路径包含到系统PATH中. Include and library search pathsInclude和library搜索路径 - On windows, the standard include and lib directories are searched relatively from the location of the executables (tcc.exe, libtcc.dll).在windows中,从可执行文件的位置搜索相应的标准include和lib目录. Examples:例子: - Open a console window (DOS box) and cd to the examples directory.打开控制台窗口并转到(cd)例子目录下. For the Fibonacci example type: 对于例子Fibonacci键入:tcc fib.c For the Hello Windows GUI example type: 对于GUI例子Hello Windows键入:tcc hello_win.c For the Hello DLL example type: 对于例子Hello DLL键入:tcc -shared dll.ctcc -impdef dll.dll (optional) tcc hello_dll.c dll.def Using libtcc as JIT compiler in your program在你的程序中使用libtcc进行编译 - Check out the libtcc_test example:参考例子libtcc_test: - Running it from source:直接运行源代码时: tcc -I libtcc libtcc/libtcc.def -run examples/libtcc_test.c - Compiling with TCC:使用TCC编译时: tcc examples/libtcc_test.c -I libtcc libtcc/libtcc.def - Compiling with MinGW:使用MinGW编译时: gcc examples/libtcc_test.c -I libtcc libtcc.dll -o libtcc_test.exe - Compiling with MSVC:使用MSVC编译时: lib /def:libtcclibtcc.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.在链接Windows系统DLL时,TCC使用输入定义文件(.def)来替代库文件. The now built-in tiny_impdef program may be used to make additional .def files for any DLL. For example当前内置的-impdef可将任意DLL生成额外.def文件. 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.将opengl32.def放入tcc/lib目录中.在TCC命令行中指定-lopengl32选项,即可在程序中使用opengl32.dll. Header Files:头文件 - The system header files (except _mingw.h) are from the MinGW distribution:系统头文件(除了_mingw.h)来自MinGW的发行版:/ From the windows headers, only a minimal set is included. If you need more, get MinGWs w32api package. Extract the files from include into your tcc/include/winapi directory.来自windows的头文件,仅包含了一个最小的集合.如果你需要更多,可从MinGW的w32api包中获取.提取include下的文件到你的tcc/include/winapi目录下. Resource Files:资源文件 - TCC can link windows resources in coff format as generated by MinGWs windres.exe. For example:TCC能将MinGW的windres.exe生成的资源文件链接到coff格式内. windres -O coff app.rc -o appres.o tcc app.c appres.o -o app.exe Tiny Libmaker:Tiny库生成器 - The now built-in tiny_libmaker tool by Timovj Lahde can be used as ar replacement to make a library from several object files:当前内置了Timovj Lahde的Tiny库生成工具,已用-ar选项代替,可以将一些文件生成为一个库:tcc -ar rcsv library objectfiles . Compilation from source:从源代码编译: - * You can use the MinGW and MSYS tools available at* 你可使用从以下地址获取的MinGW和MSYS工具 Untar the TCC archive and type in the MSYS shell: 解压TCC压缩包,并在MSYS shell中键入: ./configure -prefix installpath make make install The default install location is c:Program Filestcc 默认的安装位置在c:Program Filestcc Cygwin can be used too with its mingw cross-compiler installed: Cygwin也可以用它自己的mingw交叉编译器进行安装: ./configure -cross-prefix=i686-w64-mingw32- (the prefix may vary前缀可能会有所不同) * Alternatively you can compile TCC with just GCC from MinGW using 或者你也可使用MinGW的GCC来编译TCC build-tcc.bat (from the win32 directory在win32目录中) Also MSVC can be used with the VSTools Developer Command Prompt: 也可以在VS工具的开发者命令提示行下这样使用MSVC: build-tcc.bat -c cl (译者注:可查看build-tcc.bat的cl选项) or with an existing tcc (needs to be in a different directory) 或者使用一个已有的tcc(需要放在不同的目录中) build-tcc.bat -c some-tcc-dirtcc.exe Also you can copy/install everything into another directory: 还可以复制/安装所有内容到其他目录下: build-tcc.bat -i 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. 对于目标文件,当前的TCC仅支持ELF格式,而非MinGW和MSVC的COFF格式.不能在TCC与这些编译器之间交换目标文件或库. However libraries for TCC from objects by TCC can be made using 然而呢TCC也可用以下命令将目标文件制作成可用于TCC的库 tcc -ar lib.a files.o , - No leading underscore is generated in the ELF symbols.- 在ELF符号中不会生成前导下划线. Documentation and License:文档与许可证: - TCC is distributed under the GNU Lesser General Public License. (See COPYING file or /licenses/lgpl-2.1.html)TCC是在GNU通用公共许可证LGPL下分发的.(请看文件副本或http:/.) TinyCC homepage is at:TinyCC的主页在:/tcc/ WinAPI Help and 3rd-party tools:WinAPI帮助和第三方工具: - The Windows API documentation (Win95) in a single .hlp file is available on the lcc-win32 site as win32hlp.exe or from other locat
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 安徽公路水运交通安全b证题库及答案解析
- 安全测试题已答完及答案解析
- 美容护理学专业知识题库及答案解析
- 2025年电子艾灸仪行业研究报告及未来行业发展趋势预测
- 2025年电子电镀行业研究报告及未来行业发展趋势预测
- 2025年高筒靴行业研究报告及未来行业发展趋势预测
- 2025年D-甘露醇行业研究报告及未来行业发展趋势预测
- 2025年包车服务客车行业研究报告及未来行业发展趋势预测
- 2025年AST(地面储罐)行业研究报告及未来行业发展趋势预测
- 钢水罐准备工异常处理考核试卷及答案
- 【大数据“杀熟”的法律规制探究17000字(论文)】
- 队列训练齐步的行进与立定
- 人教版小学六年级数学上册单元课后练习题 全册
- 初中九年级英语课件宾语从句 公开课比赛一等奖
- 患者安全和护理质量的关联
- 社区获得性肺炎诊治进展
- 拆除沥青路面基层施工方案
- 公司网络安全培训课件
- (115)-第一章毛泽东思想及其历史地位
- 病原微生物实验室生物安全管理体系的建立与运行
- 小学数学教学设计的理论与案例分析
评论
0/150
提交评论