在 Win32 上使用 Gcc 并链接到 msvcrt.dll
我知道微软建议不要链接到 msvcrt.dll,所以请不要让我受到这个警告。他们一直在他们的软件(如 WinDbg)中这样做,并且不会引入重大更改,因为所有 VC6 应用程序都链接到 msvcrt.dll。
链接到 msvcrt.dll 有几个好处。小型可执行文件,易于部署:msvcrt 自 win98 起就存在,我不必将一些 MB C 运行时与我的安装程序捆绑在一起。
现在,是否可以使用 gcc 再次链接 msvcrt.dll 中的 C 库而不是 glibc ?如果是,怎么办?
谢谢!
I know microsoft recommends against linking to the msvcrt.dll, so please spare me from that warning. They do it all the time in their software (like WinDbg) and they won't introduce breaking changes since all VC6 apps link against msvcrt.dll.
Linking against msvcrt.dll has several benefits. Small executable, easy deployment: msvcrt is there since win98 and I don't have to bundle few MB C runtime with my installer.
Now, is it possible to use gcc to link agains the C library in msvcrt.dll instead of glibc? If yes, how?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AFAIK gcc 的 MinGW 端口确实将您的程序链接到 msvcrt.dll。
AFAIK the MinGW port for gcc does link your program to msvcrt.dll.