Which DLL files to need to run exe files in other computer?
-
[quote author="LeeMinh" date="1374553838"]When I copy to target machine. It show
This application has requested the Runtime to terminate it in an unusual way Please contact the application's support team for more information
May you explain it for me. I'm looking forward to receiving your msg.
Thanks,[/quote]That means your program crashed. Does it run properly on your development PC?Did you remember to include platforms\qwindows.dll?
What OS does your development PC use? What OS does your target PC use?
[quote author="LeeMinh" date="1374551835"]Will I must copy these dll - I comment above - (in C:\Qt\Qt5.1.0\5.1.0\mingw48_32\bin) to RELEASE folder?
I cant' copy them to another folder such as \MyProject\Myresources\Mylib folder?[/quote]No. If you copy them to another folder, the .exe file can't find them. In Qt, only plugin DLLs are put in subfolders.
All programs will look for DLLs in the same folder as the .exe -- that is normal. If you look inside C:\Program Files, you can see that most programs put the .dll files together with the .exe files.
If you want to be tidy and clear, put a Shortcut on your desktop.
-
[quote author="JKSH" date="1374562273"]That means your program crashed. Does it run properly on your development PC?
Did you remember to include platforms\qwindows.dll?
What OS does your development PC use? What OS does your target PC use?[/quote]
1.It's run fine when I run it on my development PC.
2.I forgot include platforms\qwindows.dll.
3.I use win7-32bit at development PC and target PC use win7-32bit too.
I have been checking how to add platforms\qwindows.dll to my project.
Will I copy it to \release\platforms\qwindows.dll and run executable file.
It didn't work in here. Will I reconfigure something at .pro file?
-
[quote author="LeeMinh" date="1374564383"][quote author="JKSH" date="1374562273"]That means your program crashed. Does it run properly on your development PC?
1.It's run fine when I run it on my development PC.[/quote][/quote]Sorry, I wasn't clear before: Does it run properly on your development PC, outside Qt Creator? Close Qt Creator, and run your program by launching the .exe file directly.
[quote]3.I use win7-32bit at development PC and target PC use win7-32bit too.[/quote]Ok, that should be easier then. (Deployment is harder if you build on Windows 7 and transfer to Windows XP)
[quote]I have been checking how to add platforms\qwindows.dll to my project.
Will I copy it to \release\platforms\qwindows.dll and run executable file. [/quote]Yes, that is correct. Your folder should look like this:
\release\application.exe
\release\Qt5Core.dll
\release\Qt5Gui.dll
\release\Qt5Sql.dll
\release\Qt5Widgets.dll
\release\icudt51.dll
\release\icuin51.dll
\release\icuuc51.dll
\release\libgcc_s_dw2-1.dll
\release\libstdc++-6.dll
\release\libwinpthread-1.dll
\release\platforms\qwindows.dll(but maybe it needs more. Did you use "Process Explorer":http://technet.microsoft.com/en-au/sysinternals/bb896653.aspx, as suggested by 1+1=2?)
[quote]It didn't work in here. Will I reconfigure something at .pro file?
[/quote]No, the .pro file is only for compiling and linking. -
[quote author="JKSH" date="1374565818"]
Sorry, I wasn't clear before: Does it run properly on your development PC, outside Qt Creator? Close Qt Creator, and run your program by launching the .exe file directly.
[/quote]
Yes,I close the Qt Creator and It run fine at development machine. -
Hi,
The deployment documentation "plugins chapter":https://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html#qt-plugins
explains that.
Basically you need to create the plugins folder and the needed subfolder like imageformats.appfolder
appfolder\plugins
appfolder\plugins\imageformats
etc...I've written a doc note with some examples about it but it has been on moderation for some time now and I can't access it.
-
yes, thanks for your solution . But it didnt' work , Will we NEED reconfigure something at .pro file?
After I add these folder.
*appfolder\plugins*
appfolder\plugins\accessible
appfolder\plugins\imageformats
appfolder\plugins\platforms
appfolder\plugins\sqldriversIt didn't work. So that, I try with :
*appfolder\release\plugins*
appfolder\plugins\plugins\accessible
appfolder\plugins\plugins\mageformats
appfolder\plugins\plugins\platforms
appfolder\plugins\plugins\sqldriversIt didn't work too.
-
remove the plugins from your paths please
[quote author="LeeMinh" date="1374571023"]yes, thanks for your solution . But it didnt' work , Will we NEED reconfigure something at .pro file?
After I add these folder.
*appfolder\plugins*
appfolder\plugins\accessible
appfolder\plugins\imageformats
appfolder\plugins\platforms
appfolder\plugins\sqldriversIt didn't work. So that, I try with :
*appfolder\release\plugins*
appfolder\plugins\plugins\accessible
appfolder\plugins\plugins\mageformats
appfolder\plugins\plugins\platforms
appfolder\plugins\plugins\sqldriversIt didn't work too.[/quote]
-
The only exception is platform, it should be in appfolder directly so:
appfolder\plaftorms
appfolder\plugins\imageformats
etc.. -
[quote author="SGaist" date="1374571281"]The only exception is platform, it should be in appfolder directly so:
appfolder\plaftorms
appfolder\plugins\imageformats
etc..[/quote]Both
@
appfolder\plugins\imageformats
@
and
@
appfolder\imageformats
@can be used.
But if we use the former, a configure file called qt.conf is needed. while the latter doesn't need this file.
-
[quote author="SGaist" date="1374571281"]The only exception is platform, it should be in appfolder directly so:
appfolder\plaftorms
appfolder\plugins\imageformats
etc..[/quote]Both
@
appfolder\plugins\imageformats
@
and
@
appfolder\imageformats
@can be used.
But if we use the former, a configure file called qt.conf is needed, or the plugins path should manually set in the source code. while the latter doesn't need this.
-
It's still didn't work. May you access my machine by teamviewer?.
I replace all of them by :
@appfolder
appfolder\accessible
appfolder\imageformats
appfolder\sqldrivers@@appfolder\release\plugins
appfolder\release\plugins\accessible
appfolder\release\plugins\mageformats
appfolder\release\plugins\platforms
appfolder\release\plugins\sqldrivers@But it didnt' work.
-
I put
@appfolder\plugins
appfolder\plugins\accessible
appfolder\plugins\mageformats
appfolder\plugins\platforms
appfolder\plugins\sqldrivers@And write code:
@int main(int argc, char *argv[])
{
qApp->addLibraryPath("../plugins");
QApplication a(argc, argv);MainWindow w; w.show(); return a.exec();
}@ at main.cpp
But it didnt' work. Just show "Microsoft Visual C++ runtime library".
-
- Where did you put qsqlite.dll?
- What compiler did you use?
- How many copies of Qt do you have on your development PC?
- Which package(s) of Qt did you install?
** Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)?
** Qt 5.1.0 for Windows 64-bit (VS 2012, 525 MB)?
** Something else?
-
Hi, I'm trying to solve the same problem. I do believe that the issue I have has something to do with QML. But I'm not sure. I copied all the DLLs the program requested, but if I run it, I only get a blank window.
I even tried to use q .qrc file, to include the .qml files in the .exe file. But with the same result.
What bothers me most is that I don't know how to find out what is wrong. Even if I run the program from console, it doesn't show any message in it.
-
Hi Jech,
Did you deploy the built-in QML-related files? You need the *.qml, qmldir and *.dll files in C:<Qt>\qml.