MinGW Link单个EXE [英] MinGW Link Single EXE
本文介绍了MinGW Link单个EXE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我安装了MinGW,我只想将我的程序链接到一个EXE文件中.我希望能够将此EXE文件提供给某人,而不必担心所有libgcc_s_dw2-1.dll,libstdc ++-6.dll或任何其他DLL.有没有一种方法可以将所有必需的库静态链接到单个EXE中?
I installed MinGW and I just want to link my program into a single EXE file. I want to be able to give this EXE file to someone without having to worry about all the libgcc_s_dw2-1.dll, libstdc++-6.dll,or any other DLL. Is there a way to statically link all the required libraries into a single EXE?
我正在Windows 7上进行开发.
I am developing on Windows 7.
推荐答案
与库链接时,可以使用-static
选项,对于libgcc和libstdc ++,请使用以下选项:
You can use -static
option when linking with libraries, and for libgcc and libstdc++ use the following:
-static-libgcc -static-libstdc++
这篇关于MinGW Link单个EXE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文