本文介绍了我可以链接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()创建那并不是一个可执行文件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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 12:25