我从这里使用 mingw: http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.2/32-bit/threads-posix/sjlj/x32-4.7.2-release-posix-sjlj-rev2.7z/download
And I’ve sucessfully managed to link libstdc++-6.dll
and libgcc_s_sjlj-1.dll
by using -static-libgcc -static-libstdc++
parameters, but I cannot find a command for doing the same with libwinpthread-1.dll
.
原文由 rsk82 发布,翻译遵循 CC BY-SA 4.0 许可协议
您可能应该检查 GCC 的命令行选项文档。
这些没有“-static-something”命令,只有标准库(libgcc 和 libstdc++)可以通过一个命令设置为静态链接。对于其他库,您首先使用“-static”切换到静态链接,然后使用单独的命令(即“-lpthread”)列出要包含的库。