当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 6

hackflame / VC-LTL
暂停

forked from 初雨团队 / VC-LTL
暂停
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
EPL-2.0

VC-LTL——编译精巧的程序原来如此简单

Logo
我愿化成一座做石桥,经受五百年的风吹,五百年的日晒,五百年的雨打,只求她从桥上走过!

1. 关于VC-LTL

VC-LTL是一个基于微软VC修改的开源运行时,有效减少应用程序体积并摆脱微软运行时DLL,比如msvcr120.dll、api-ms-win-crt-time-l1-1-0.dll等依赖。

VC-LTL最初是Dism++专用运行时。2017年3月6号从Dism++源代码中分离,并正式对外开源,为社区贡献自己的微薄之力。

在大型项目中往往有众多模块,如果都采用静态编译那么造成的空间浪费先不说,最后也会因为Fls上限导致程序无法正常运行。

而VC-LTL能让你的项目如同系统文件一样共享系统内置msvcrt.dll,有效的解决Fls上限以及运行时部署问题,同时大大缩减程序体积,可以说一箭三雕!

所有人都可以无条件、免费使用,包括用于商业环境。当然如果大家在自己的程序说明文件中声明使用了VC-LTL那就更好了。

1.1. 原理

使用VC-LTL后可以将程序动态链接到系统自带的msvcrt.dll中,来减少程序体积。目前使用CRT以及STL的工程一般都可以使用。但是MFC工程不能使用,因为MFC类库太复杂了,尚未适配。

使用VC-LTL,C++程序体积大约缩减30%,而纯C程序则大约缩减50%。

1.2. 亮点

  • 晚起的鸟儿也有虫虫吃,优雅的引用方式,仅添加一个属性表就能享受极致的体积体验。
  • 无缝使用最新C/C++库以及最新编译器,尽情的使用最新规范。神马异常流防护(guard:cf)、静态对象线程安全初始化(threadSafeInit)……统统放马过来吧!!
  • 拥有比微软原版更好的兼容性,即使想兼容Windows XP RTM也可以安心的对新编译器说“Yes”。
  • 完全的开放代码,广泛的接受用户意见,希望大家能踊跃的 pull requests,为VC-LTL添砖加瓦。

让我们一起跟VS 2008说拜拜!

2. VC-LTL兼容性

此表展示了VC-LTL,C/C++库函数覆盖率,通过覆盖情况,可以大致了解VC-LTL的完善程度。

模块 XP模式 Vista模式 UCRT模式 相关文件
CRT 94.716% 96.347% 100% vcruntime.lib、libvcruntime.lib、msvcrt.lib、msvcmrt.lib、msvcrt_Platform.lib、libucrt.lib、ucrt.lib、libucrt_shared.lib、vc.lib
STL 100% 100% 100% libcpmt.lib、msvcprt.lib
ConcRT 100% 100% 100% libconcrt.lib、concrt.lib
WinRT X 100% X vccorlib.lib(仅支持Windows 8.1以及更高版本)
ATL 100% 100% 100% -
MFC X X 100% -
AMP X X X -
OpenMP 100% 100% 100% Visual Studio自身提供,需要带上vcomp140.dll

2.1. 支持的IDE

  • Visual Studio 2015(包含Clang with Microsoft CodeGen、Clang 3.7 with Microsoft CodeGen、Clang-LLVM)
  • Visual Studio 2017(包含Clang with Microsoft CodeGen、Clang-LLVM)
  • Visual Studio 2019

2.2. 支持的编译工具

编译工具 支持文件
Visual Studio VC-LTL helper for Visual Studio.props
CMake VC-LTL helper for cmake.cmake
NMake、CL VC-LTL helper for nmake.cmd
QMake VC-LTL helper for qmake.pri

2.3. 支持的操作系统

操作系统 x86 x64 arm arm64
Windows XP、Windows Server 2003 - -
Windows Vista、Windows Server 2008 - -
Windows 7、Windows Server 2008 R2 - -
Windows 8、Windows Server 2012、Windows RT -
Windows 8.1、Windows Server 2012 R2、Windows RT 8.1 -
Windows 10、Windows Server 2016、Windows Server 2019

采用VC-LTL编译后的程序能兼容Windows XP RTM以上所有操作系统,无需安装任何SP补丁包。

3. 使用方法

下面我们将进入主题,我们给大家准备了丰富的VC-LTL示例供大家参考,也欢迎加入我们的QQ群(633710173)。

3.1. 安装VC-LTL

假如,你将VC-LTL Binary下载并解压至D:\Src\VC-LTL(具体位置无任何要求),双击D:\Src\VC-LTL\Install.cmd即可。

脚本会在HKCU\Code\VC-LTL创建注册表。

3.2. 在Visual Studio中使用VC-LTL

3.2.1. 添加VC-LTL属性表

将属性表VC-LTL helper for Visual Studio.props复制到你的工程目录,你可以打开属性管理器(视图 - 属性管理器),然后Release配置上右键添加现有属性表,然后选择VC-LTL helper for Visual Studio.props即可。

AddShared

3.2.2. 配置工程属性

  • C/C++ - 代码生成 -【运行库】调整为【多线程 (/MT)】

ConfigurationProject

如需支持XP,请在平台工具集中选择Windows XP或者修改VC-LTL helper for Visual Studio.props启用 <SupportWinXP>true</SupportWinXP> 即可。

3.3. 在CMake中使用VC-LTL

3.3.1. 添加VC-LTL配置文件

将模块文件VC-LTL helper for cmake.cmake复制到你的工程目录(顶层CMakeLists.txt同级目录)。然后在CMakeLists.txt中添加一行 include("VC-LTL helper for cmake.cmake") 即可。

示例:

cmake_minimum_required(VERSION 3.5.2)
project(ltltest)

include("VC-LTL helper for cmake.cmake")

add_subdirectory(src)

3.3.2. 调整配置工程

务必确保使用/MT编译代码。如需支持XP,请修改VC-LTL helper for cmake.cmake启用 set(SupportWinXP "true") 即可。

3.4. 在NMake/纯CL中使用VC-LTL

3.4.1. 运行VC-LTL辅助脚本

将辅助脚本VC-LTL helper for nmake.cmd复制到你的工程目录。启动vcvars32.bat/vcvars64.bat执行此脚本即可,脚本将自动修改include以及lib环境变量。

示例:

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
call "D:\VC-LTL\VC-LTL helper for nmake.cmd"

nmake /f Test.mak

3.4.2. 配置工程属性

务必确保使用/MT编译代码。如需支持XP,请修改VC-LTL helper for nmake.cmd启用 set SupportWinXP=true

3.5. 重新编译(仅Release)

现在是不是体积就小了很多。如果你编译不通过,可以先参考 4. 常见问题。如果还是不通过可以反馈,共同改进VC-LTL。

如果正确引用VC-LTL,那么 会在生成时输出:note: 进入ltl普通模式,已准备引用到VC-LTL。定义 _DISABLE_DEPRECATE_LTL_MESSAGE 可关闭信息提示。

使用VC-LTL编译时必须采用/MT编译,并且所有依赖的静态库也必须使用VC-LTL重新编译。

AppBuildByVC-LTL

4. 常见问题

4.1. 未共享到msvcrt.dll

问题原因

未正确引用VC-LTL。建议看看生成日志,是否包含:note: 进入ltl普通模式,已准备引用到VC-LTL。定义 _DISABLE_DEPRECATE_LTL_MESSAGE 可关闭信息提示。

解决方案

1:请务必确保 VC-LTL helper for Visual Studio.props 已经添加到工程。

2:确保以下设置正确:

  • VC++ 目录 - 包含目录 - 【√ 从父项或项目默认设置继承(I)】
  • VC++ 目录 - 库目录 - 【√ 从父项或项目默认设置继承(I)】

4.2. 无法解析外部符号 delete 等

问题原因

没有正确引入vc.lib、msvcrt_Platform.lib。

解决方案

  • VC++ 目录 - 包含目录 - 【√ 从父项或项目默认设置继承(I)】
  • VC++ 目录 - 库目录 - 【√ 从父项或项目默认设置继承(I)】

4.3. 检测到RuntimeLibrary的不匹配项

问题原因

引入了没有使用VC-LTL编译的静态lib文件。

解决方案

使用VC-LTL重新编译对应的静态lib(具体lib名称错误日志会给出)。

5. 已知问题

  • 由于WinXP本身Bug,printf相关函数输入缓冲区最大字符数为0x3FFFFFFF(包含)。当你需要兼容XP时,请务必确认缓冲区输入长度小于0x3FFFFFFF,或者直接使用 _CRT_STDIO_SIZE_MAX 宏。(4.0.2.5 Advanced模式已经修正此问题)
  • 由于WinXP本身Bug,printf相关函数无法正常支持%ll。当你需要兼容XP时,请优先考虑使用%I64代替。(4.0.2.5 Advanced模式已经修正此问题)
  • 由于msvcrt本身限制,setlocale/_create_locale相关函数不支持UCRT的locale name,使用时必须按VC 2008规范使用,比如 setlocale(0, "chs"); 这样调用,而不是传入 setlocale(0, "zh-CN");
  • 由于FH4异常(/d2FH4 VS2019新增功能)实现过程中使用了TLS,因此在兼容“Windows XP(2003) x64”时请务必确保不要在DllMain中使用FH4 catch,否则将导致dll直接加载失败。

附:已知使用VC-LTL的官方项目

项目 备注
NSudo 一个强大的系统管理工具。VC-LTL的帮助下减少30%的程序体积,包括NSudo for arm64。
Menu98 经典样式可自定义的开始按钮右键菜单。使用VC-LTL移除运行时依赖。
壁虎浏览器 一款专业解决DNS劫持的浏览器。使用VC-LTL有效减少程序体积,减少安装包大小。
librech551 开源跨平台的CH55x ISP软件。使用VC-LTL移除运行时依赖。
Dism++ Dism GUI版。初雨团队自身项目,使用VC-LTL有效减少程序体积,减少安装包大小。
360安全卫士 奇虎360推出的上网安全软件。360EvtMgr.exe、360leakfixer.exe、360Util.dll、leakrepair.dll等文件使用VC-LTL编译,在VC-LTL的支持下:升级新编译器,减少文件尺寸,完美兼容WinXP,一箭三雕。

附:第三方依赖项许可

更新日志

1.0.0.1 2016-05-23 13:42

  • 解决C++异常无法使用问题。

1.0.0.2 2016-06-14 12:52

  • 解决C编译不通过问题。

1.0.0.3 2016-11-28 12:54

  • 改进对C工程的兼容性。

1.0.0.4 - 公众第一版(2017-03-06 16:15)

  • 与Dism++彻底分离,方便以后与Dism++共享代码。

1.0.0.5 - 新增Visual Studio 2017支持(2017-03-16 20:53)

  • 新增VC 2017支持。

1.0.0.6 - 优化引用方式(2017-03-18 13:46)

  • 优化文件引用。

1.0.0.7 - 初步添加Windows XP支持(2017-04-22 19:26)

  • 初步添加Windows XP支持。
  • 添加C++异常支持。
  • 添加/GS特性支持。
  • 添加/guard:cf支持。
  • VC140库升级到Vistual Studio 2015 Update3。

1.0.0.8 - 简化VC-LTL使用(2017-04-25 20:37)

  • 简化库引用方式。
  • 更新14393 ucrt到最新版(2017-01-05版)。
  • 添加15063 ucrt支持。

1.0.0.9 - 添加C++异常支持(2017-05-26 14:46)

  • 改进Windows XP支持。
  • 优化库结构裁剪ltl库体积。
  • 解决使用自定义异常导致程序编译不通过问题。
  • 调整*_p系列函数定义,以免使用*_p系列函数时编译不通过。
  • 解决使用浮点除法时导致编译不通过问题。

1.0.0.10 - 改进对Windows XP的支持(2017-07-28 20:28)

  • 解决Bug 9,某些时候编译器引用异常导致XP模式时意外引入_except_handler4_common(感谢 HwangBae)。
  • 解决Bug 8,修复typeid功能无法使用问题(感谢 HwangBae)。
  • 调整异常实现代码,尽可能复用msvcrt.dll代码减少代码体积。
  • 解决Bug,修复无法使用__argc__argv__wargv_environ_wenviron全局变量问题(感谢 亮叔叔)。
  • 解决微软Bug,修复使用ATL库的程序不支持XP RTM问题。

1.0.0.11 - 解决lib依赖问题(2017-08-23 19:00)

  • 解决Bug,使用_difftime64时Windows XP无法运行。
  • 解决Bug,_msvcrt.cpp始终会引入urct_14393.lib问题(感谢 亮叔叔)。
  • 更新VC141头文件以及实现,全部同步到最新14.11。

1.0.0.12 - 解决某些函数无法使用问题(2017-09-15 13:33)

  • 解决Bug,使用strcat_s时在Windows XP中提示找不到指定符号(感谢 stsm85)。
  • 解决Bug,解决SSE2除法导致编译不通过问题(感谢 stsm85)。
  • 解决Bug,解决wcstoll、vsnprintf、rand_s、strtoll无法使用问题(感谢 stsm85)。
  • 代码调整,消除所有VC-LTL编译警告,强迫症患者福音。

本次更新后,FastCopy、winpck相关程序直接可以使用VC-LTL编译。

1.0.0.13 - 新增 Windows 10 16299 UCRT支持(2017-10-11 14:00)

  • 解决Bug,atanh、acosh、asinh无法使用问题(感谢 stsm85)。
  • 新增Windows 10 16299 UCRT支持。
  • 移除Windows 10 14393 UCRT支持。

16299已经发布,因此移除老版本14393支持。相关项目请迁徙到15063或者最新16299。

2.0.0.1 - 新增C++类库支持(2017-10-29 22:23)

  • 新增iostream、stringstream支持。
  • 解决使用_fstat32_fstat32i64_fstat64i32_stat32_stat32i64_stat64i32_wstat32_wstat32i64_wstat64i32导致编译不通过问题。
  • 修正__acrt_iob_func始终返回输入流问题。
  • 解决 type_info operator != 功能无法使用问题(感谢 sonyps5201314)。
  • 解决_daylight_dstbias_timezone_tzname无法使用问题(感谢 sonyps5201314)。
  • 解决32位 SSE高精度数据函数无法使用问题,比如_libm_sse2_tan_precise_libm_sse2_sqrt_precise_libm_sse2_sin_precise(感谢 stsm85)。

2.0.0.2 - 扩充对C++类库的支持(2017-11-05 14:14)

  • 新增 _configthreadlocale_get_current_locale_create_locale_free_locale接口支持。
  • 为Windows XP添加 _time32_fseeki64静态实现。
  • 解决Bug 14,新增 _getpid_sys_nerr_sys_errlist无法使用问题(感谢 HwangBae)。
  • 新增C++类,mutex、thread、xtime、xonce支持。
  • 优化编译方式,消除无意义符号,减少ltl库体积。

2.0.0.3 - 补充大量XP静态实现(2017-11-18 14:18)

  • Vista编译模式,CRT函数覆盖率达到90%以上。
  • XP编译模式,CRT函数覆盖率达到80%以上。
  • 简化注册表引用方式。
  • 添加std::thread支持。

2.0.0.4 - 全面覆盖STL、ConcRT(2017-12-03 20:40)

  • 全面覆盖STL、ConcRT库,让C++如鱼得水,尽情使用STL。
  • 全新的weak别名转发技术,实现零jmp解决新老CRT命名冲突。

2.0.0.5 - 增强C++ 17支持(2017-12-10 20:56)

  • 新增C++ 17 align new/delete支持。
  • 解决兼容WinXP时可能出现的ntdll.lib依赖失败以及某些函数转发切换到weak别名技术。

本次更新主要添加对Vistual Studio 2017 15.5以及更高版本新增的C++ 17功能支持。

2.0.0.6 - 2018新春贺岁版(2018-01-17 17:15)

  • 添加Vistual Studio 2017 15.5新增函数支持。
  • 新增Shared.props改进属性表引用灵活性。
  • 新增VC-LTL轻量模式以及高级模式支持(修改Shared.props可以调整模式)。
  • 继续扩充CRT函数支持。

2.0.0.7 - 重新规范VC-LTL(2018-03-06 17:17)

  • 重新整理VC-LTL,尽可能减少对原版改动。
  • 解决一些Bug(感谢 亮亮、layerfsd、waiting4love)。

2.0.0.8 - 累计BUG修复以及适配新版本(2018-03-23 14:58)

  • 解决一些潜在找不到符号问题以及链接失败问题(感谢 Too Simple)。
  • 修正__crtLCMapString相关字符串操作兼容性问题(感谢 Too Simple)。
  • 解决_getptd_noexit在获取msvcrt.dl的DllMain中创建的 ptd结构时会返回失败问题(感谢 亮亮)。
  • 添加最新Vistual Studio 2017 15.6支持。

3.0.0.1 - 改进平台支持(2018-04-26 18:48)

  • 解决Bug 27,非中文环境调用_set_abort_behavior输出警告问题(感谢 myfreeer)。
  • 解决Bug 21,特定情况nothrow符号冲突问题(感谢 waiting4love)。
  • 解决Bug,解决x64系统无法使用__p__*系列函数问题(感谢 昌平)。
  • 改进体验,当RC中意外引入_msvcrt.h时 自动跳过处理,避免RC报错(感谢 风清凉)。
  • 改进体验,“Shared.props”改名为“VC-LTL helper for Visual Studio.props”并大幅度增强对某些极端工程的支持。
  • 新增Fea 25,添加“VC-LTL helper for nmake.cmd”,方便nmake引入VC-LTL。
  • 新增Fea,添加“VC-LTL helper for cmake.cmake”,方便cmake引入VC-LTL(感谢 Sandro)。
  • 新增Fea,全面支持ARM、ARM64支持。

3.0.0.2 - 添加Vistual Studio 2017 15.7支持(2018-05-18 21:07)

  • 新增Fea,添加VC 14.0.24234以及14.14.26428支持。
  • 新增Fea,添加UCRT 10.0.17134.0支持。
  • 新增Fea,添加Spectre缓解库支持。
  • 解决Bug,找不到gets符号问题(感谢 npc)。

VC-LTL本次从仓库中剔除了lib文件,VC-LTL用户请下载VC-LTL Binary,然后再使用VC-LTL编译代码。

3.0.0.3 - 儿童节专版(2018-05-31 17:07)

  • 解决Bug 32,链接时找不到符号__p__fmode(感谢 augustheart)。
  • 更新许可。

3.1.0.1 - 添加Clang支持(2018-06-18 13:13)

  • 新增Fea 34,添加Clang with Microsoft CodeGen、Clang 3.7 with Microsoft CodeGen、Clang-LLVM工具集支持(感谢 hzqst)。
  • 解决Bug,非中文代码页corecrt.h报告 C4828警告(感谢 临渊羡鱼乎)。
  • 解决Bug 35,调用vsnprintf时触发警告C4389: “==”: 有符号/无符号不匹配(感谢 zhaooptimus)
  • 解决Bug,减少amd64程序调用_hypotf函数时的二进制体积。
  • 解决Bug,解决VS15.7 special_math无法使用问题

4.0.0.2 - 添加VC-LTL动态库支持(2018-08-14 12:30)

全新的VC-LTL 4.0,代号——“破晓”,作为大版本升级某些行为已经更改:

  1. VC-LTL 4.0 开始,如需静态编译(仅依赖msvcrt.dll)请使用/MT编译。
  2. VC-LTL 4.0 不兼容VC-LTL 3.X编译的静态库,你需要使用VC-LTL 4.0(破晓)重新编译。
  • 新增Fea,添加VC-LTL动态库支持,使用/MD编译即可链接到 ucrtbase_ltl.dll 等DLL。
  • 新增Fea,彻底抛弃DDK,重构CRT库,全面支持指针混淆、quick_exit__stdio_common等功能。
  • 新增Fea,添加ARM、ARM64链接到msvcrt.dll支持。
  • 新增Fea,添加WinRT(CX)支持(仅限于Windows 8.1以及更高版本支持)。
  • 改进体验,XP模式时无需手动指定所需的最低版本
  • 改进体验,充分利用msvcp60.dll缩小程序体积。

4.0.0.10 - 添加Vistual Studio 2017 15.8支持(2018-08-26 17:20)

  • 解决Bug,解决CMake脚本语法错误(感谢 MaMy丶)。
  • 解决Bug,解决CMake脚本文件路径判断方式不正确问题。
  • 解决Bug,解决CMkae、NMake脚本lib路径错误问题(感谢 Too Simple、MaMy丶)。
  • 解决Bug,修正MD模式报告找不到_libm_sse2_tan_precise相关符号问题(感谢 13732650)。
  • 解决Bug,由于微软类库自身设计缺陷,必须关闭sdl,阻止类成员0初始化,避免特定场合STL崩溃问题(感谢 漆黑の牙)。
  • 新增Fea,添加Vistual Studio 2017 15.8支持。
  • 新增Fea,添加lib文件检测,如果不存在则报错。

4.0.0.17 - 添加C++/CLI支持(2018-09-26 10:00)

  • 解决Bug 40,XP x64模式中使用RTTI时链接失败问题(感谢 killvxk)。
  • 解决Bug 41,当禁用内部函数时无法使用_byteswap_ulong_byteswap_uint64_byteswap_ushort(感谢 wangwenx190)。
  • 解决Bug,当禁用内部函数时,Windows XP提示找不到_abs64_rotl64以及_rotr64函数的入口点。
  • 新增Fea,添加wcstold_wcstof_l_wcstod_l_wcstold_l_strtod_l(xp)以及_strftime_l(Vista)。
  • 新增Fea,添加C++/CLI支持(感谢 naturalj0)。

4.0.0.26 - 累计问题修复(2018-12-19 18:00)

  • 解决Bug,修复Windows XP模式_Atexit函数依赖EncodePointer问题(感谢 亮亮)。
  • 解决Bug,修复微软原版details::Etw中错误的使用EncodePointer问题。
  • 解决Bug,修复_initialize_onexit_table_downlevel一处内存泄漏问题(感谢 g-qa-ck组)。
  • 解决Bug,修复Windows XP找不到函数operator new(size_t,int,char const *,int)operator new[](size_t,int,char const *,int)入口点(感谢 希望)。
  • 解决Bug,修复Spectre + WinXP 32下缺失exsup4符号问题(感谢 Too Simple)。
  • 新增Fea,添加delete[](void *, std::nothrow_t const &)(感谢 Too Simple)。
  • 新增Fea,添加Windows 10 17763 UCRT支持(感谢 毛利)。
  • 新增Fea,添加VS 2017 14.16.27023工具集支持。
  • 新增Fea,为Windows XP添加_IsExceptionObjectToBeDestroyed、_CreateFrameInfo、_FindAndUnlinkFrame(感谢 夏思畅)。

4.0.0.28 - 累计问题修复(2019-02-16 14:50)

  • 解决Bug 45,main函数argv参数默认被展开问题(感谢 xspeed1989 )。
  • 解决Bug,VS 14.14.26428以及更高平台缺少pplerror.cpp问题(感谢 xspeed1989 )。
  • 新增Fea,改进Visual Studio 2017中对Clang-LLVM的支持(感谢 神话)。
  • 新增Fea,新增VC-LTL helper for qmake.pri脚本,改进对QMake的支持(感谢 漆黑の牙)。

4.0.1.10 - 改进支持(2019-06-01 13:40)

  • 解决Bug,Windows XP模式没有引用advapi32.lib,可能导致ImpersonateSelf等符号无法解析(感谢 昌平517)。
  • 解决Bug,微软原版std::thread依赖GetLogicalProcessorInformation导致XP RTM无法运行(感谢 小古)。
  • 解决Bug,为XP模式添加_mbsinc,解决此函数越界问题(感谢 亮亮)。
  • 解决Bug,微软原版std::mutex依赖GetNumaHighestNodeNumber导致XP RTM无法运行。
  • 解决Bug,ucrtbase_ltl.dll没有导出llabs(感谢 GPBeta)。
  • 解决Bug,将意外遗漏的_downlevel后缀删除(感谢 过客)。
  • 解决Bug,config.pri错误导致QT无法加载问题(感谢 GPBeta)。
  • 新增Fea,VC-LTL helper for qmake.pri脚本添加老版本QMake兼容(感谢 大胸滴)。
  • 新增Fea,CMake脚本添加vcpkg兼容(感谢 大胸滴)。
  • 新增Fea,添加Visual Studio 2019支持。
  • 新增Fea,新增10.0.18362.0 UCRT支持(感谢 毛利)
  • 改进体验,Vista模式将_ATL_XP_TARGETING以及_USING_V110_SDK71_宏从错误降级到警告。

4.0.2.14 - 改进支持(2019-08-14 18:00)

  • 解决Bug,Windows XP模式找不到 __wcsrtombs_utf8 符号问题(感谢 水边)。
  • 解决Bug 56,解决(w)printf、std::(w)cout等无法输出中文问题。
  • 解决Bug,_tzname声明错误(感谢 大胸)。
  • 解决Bug,Windows XP模式中_splitpath_s、_wsplitpath_s文件名为空问题(感谢 水边)。
  • 新增Fea,添加 _CRT_STDIO_ISO_WIDE_SPECIFIERS 宏以及 legacy_stdio_definitions.lib 支持(感谢 大胸)。
  • 新增Fea,添加_initialize_invalid_parameter_handler_initialize_denormal_control_get_startup_thread_locale_mode(仅Vista模式)支持。
  • 新增Fea,添加 14.22.27905 工具集支持。
  • 新增Fea,为Windows XP添加_atoi_l、_strtol_l、_atoflt_l、_atoldbl_l等支持。
  • 新增Fea 17,为Windows XP添加_create_locale、_wcreate_locale、_get_current_locale支持。
  • 新增Fea,14.16.27023同步到14.16.27033版本。
  • 改进体验,改进与联想一键影音的兼容性,由于联想一键影音错会乱Hook,导致LoadLibraryExW行为异常。这样将导致VC-LTL等在没有安装KB2533623的系统上无法正常使用问题(微软原版也同样存在此问题)。
  • 改进体验,改进Windows 7 RTM以及以下系统的兼容性,由于这些老版本系统由于在LoadLibraryExW期间不会恢复重定向,因此当目标线程关闭重定向时可能导致VC-LTL无法正常工作(微软原版也同样存在此问题)。
  • 改进体验 53,关闭对STL库的引用消除,规避LLVM链接失败问题(感谢 hotxp、BigBrother)。
Eclipse Public License - v 2.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 1. DEFINITIONS "Contribution" means: a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and b) in the case of each subsequent Contributor: i) changes to the Program, and ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution "originates" from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works. "Contributor" means any person or entity that Distributes the Program. "Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions Distributed in accordance with this Agreement. "Recipient" means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors. "Derivative Works" shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. "Modified Works" shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof. "Distribute" means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy. "Source Code" means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files. "Secondary License" means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor. 2. GRANT OF RIGHTS a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works. b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3). 3. REQUIREMENTS 3.1 If a Contributor Distributes the Program in any form, then: a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license: i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3. 3.2 When the Program is Distributed as Source Code: a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and b) a copy of this Agreement must be included with each copy of the Program. 3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability ("notices") contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices. 4. COMMERCIAL DISTRIBUTION Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. 5. NO WARRANTY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. 6. DISCLAIMER OF LIABILITY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. GENERAL If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement. Exhibit A - Form of Secondary Licenses Notice "This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}." Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses. If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership.

简介

共享使用系统内置msvcrt.dll,有效减少C/C++程序体积同时告别UCRT运行库的折磨。 展开 收起
C++
EPL-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/hackflame/VC-LTL.git
git@gitee.com:hackflame/VC-LTL.git
hackflame
VC-LTL
VC-LTL
master

搜索帮助