所以我使用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并且能够无误地运行它。
答案 0 :(得分:3)
我想静态链接就是你想要的,详见these Qt docs。
答案 1 :(得分:2)
原因是你在mingw中使用gcc来编译程序。您可以使用您的程序分发这两个dll(它们位于C:\ Qt \ YOUR_VERSION \ mingw \ bin中)或者执行静态构建,如7vies所示。
答案 2 :(得分:1)
他不需要在他的电脑上安装Qt。您需要链接Qt库并将它们构建到可执行文件中,或者在分发中包含必要的dll / library文件。您必须静态链接到Qt库/文件/等。希望这可以帮助。
答案 3 :(得分:-1)
他需要在他的电脑上安装Qt库。告诉他去here。