Windows版GCC之TDM-GCC 4.5.2

平时写 C/C++ 小程序的时候,不喜欢开VS,太庞大了,还要建项目。对于小程序,一个可以进行单文件编译的 IDE 是我的首选,我用的是 C-Free 5.0,内置编译器 MinGW,Windows 版 GCC。

前几在 C-Free 5.0 上写排序程序,想看一下大概的执行时间,于是用 C 标准库函数 clock() ,结果包含的 time.h 头文件一直不能通过编译。把源代码复制到 VS 2008 里居然顺利编译通过,猜想这应该是编译器 MinGW 的问题,忍忍吧。

前天把系统搞得一踏糟,无奈之下还原,今天找了个最新版的 MinGW 编译器,没想到 time.h 头文件的问题没了,爽。

其实我用的不是 MinGW 官方版,而是另一个发行版本 TDM-GCC,目前最新版 4.5.2,一下翻译一段介绍:

TDM-GCC是一个 Windows 版的编译器套件。
它结合了 GCC 工具集中最新的稳定发行版本,包括了自由并开源的 MinGW 或 MinGW-w64 的运行时 APIs,以此创建一个 LIBRE 来替代微软的编译器及其平台 SDK。
它可以创建自 Windows 95 以来任何 Windows 操作系统版本之上的 32 位或 64 位的二进制文件。

提供一个下载地址:http://tdm-gcc.tdragon.net/

另外在某博客上有下面一段话:

TDM (Twilight Dragon Media) 和 MinGW官方没有任何瓜葛。TDM中包的版本一般比MinGW官方版新,似乎有MinGW的成员也在用TDM版。力挺这个的人似乎也挺多。

TDM GCC 分两个版本(异常处理方式不同)

SJLJ (setjmp/longjmp) 
DW2 (Dwarf-2) 
MinGW 中采用的是后者,TDM GCC 建议首选前者。

http://www.cnblogs.com/wxxweb/archive/2011/05/30/2063434.html

-----------------------------------------------------------------------------------------------------------------

自我说明:

TDM-GCC is pleased to present new toolchains based on GCC 5.1.0, as well as updated GDB packages for 32-bit and 64-bit native Windows.

This TDM-GCC release incorporates a few more local patches from the MinGW-w64 project's MinGW-Builds releases. Also, a 32-bit GDB is now available, and both 32-bit and 64-bit GDB automatically load GCC's libstdc++ "pretty printers", if available, to provide more readable debugging output for libstdc++ objects. See the README files included in the core and gdb packages for details on all local patches.

Please make sure to read the Quirks page for more information about the differences between TDM-GCC and other GCC toolchains.

http://tdm-gcc.tdragon.net/quirks

-----------------------------------------------------------------------------------------------------------------

主要区别:

Static runtime linkage (libgcc & friends)
  • TDM-GCC doesn't link your programs with the libgcc or libstdc++ runtime DLLs by default.
  • Other toolchains default to DLL runtime linkage in order to allow you to throw exceptions among DLLs and EXEs.
  • TDM-GCC lets you throw exceptions among DLLs and EXEs even with the static runtime.
  • Your programs will not rely on any additional DLLs when compiling with default options.
  • TDM-GCC still includes DLL versions of the libgcc and libstdc++ runtimes, which you can enable for your program with "-shared-libgcc" and "-shared-libstdc++" if desired.

http://tdm-gcc.tdragon.net/quirks

最新文章

  1. nodejs 生产环境配置
  2. 未在本地计算机上注册“microsoft.ACE.oledb.12.0”提供程序解决办法
  3. Project中分清楚挣值项
  4. Git 常用命令整理
  5. 最短路算法floyd
  6. 2天驾驭DIV+CSS (实战篇)(转)
  7. HDOJ2000ASCII码排序
  8. Python3基础 内嵌函数 简单示例
  9. SharePoint备份文件
  10. 解决beego1.12新版本没有log.info
  11. Linux:Day8(上) 文件系统挂载和管理工具
  12. git status -s命令解析
  13. node多项目合一打包
  14. JS应用实例6:二级联动
  15. dhttp与IdCookieManager处理登陆过程
  16. 共分为六部完成根据模板导出excel操作
  17. Input的类型(type)
  18. ABAP-动态创建DATABASE/FUNCTION(风险)
  19. epoll—IO多路复用
  20. 排序算法之冒泡排序Java实现

热门文章

  1. Excel Add-in
  2. CSS笔记 - fgm练习 2-9 - 播放列表收缩展开
  3. 【转】排列组合 "n个球放入m个盒子m"问题 总结
  4. 基于深度学习的人脸识别系统(Caffe+OpenCV+Dlib)【三】VGG网络进行特征提取
  5. PHP Web木马扫描器代码
  6. Caffe 学习:Crop 层
  7. 一位90后程序员的自述:如何从年薪3w到30w!
  8. 【转】移动Web开发-点击事件及页面滚动
  9. 【2006】求N!的精确值
  10. 【29.42%】【POJ 1182】食物链