我可以链接MSVCRT静态使用MinGW? [英] Can I link MSVCRT statically with mingw?

查看:258
本文介绍了我可以链接MSVCRT静态使用MinGW?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上的C程序我的MinGW 编译。它工作正常,但需要 MSVCRT.DLL 。我想静态链接(比如我可以在Visual Studio中做的)。这可能吗?

I have C program I compile with mingw on Windows. It works fine but requires MSVCRT.DLL. I want to link that statically (like I can do in Visual Studio). Is this possible?

我试过 -static 标志 GCC ,并没有做出任何改变。

I tried -static flag to gcc and it didn't make any change.

怎么样的C ++程序?

What about C++ program using also standard C++ library?

推荐答案

我相信MinGW的不使用静态运行时库因版权原因。

I believe that MinGW doesn't use the static runtime library for copyright reasons.

您也许可以尝试使用newlib( http://sourceware.org/newlib/ )创建那并不是一个可执行文件T链接到 MSVCRT.DLL

You can maybe try to use newlib (http://sourceware.org/newlib/) to create an executable that doesn't link to msvcrt.dll

这篇关于我可以链接MSVCRT静态使用MinGW?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆