所以我用Qt Creator (Windows)做了一个程序,然后编译并运行。它在我的电脑上运行良好,但当我把它发送给我的一个朋友时,他得到了以下错误:
The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem.
The program can't start because mingwm10.dll is missing from your computer. Try reinstalling the program to fix this problem.
我能做什么使exe基本上是独立的,这样我就可以将exe发送到任何地方,并且能够运行它而不会出现错误。
发布于 2010-07-12 06:17:05
我猜静态链接就是你想要的,详细的解释见these Qt docs。
发布于 2010-07-12 06:17:17
因为你是用了mingw的gcc来编译程序的。您可以将这两个dll与您的程序一起分发(它们可以在C:\Qt\YOUR_VERSION\mingw\bin中找到),也可以按照7vies的建议进行静态构建。
发布于 2010-07-12 06:18:40
他不需要在他的计算机上安装Qt。您需要链接Qt库并将其构建到可执行文件中,或者将必要的dll/库文件包含在发行版中。你必须静态链接到Qt库/文件/等。希望这能有所帮助。
https://stackoverflow.com/questions/3224802
复制相似问题