You probably need to deploy the Qt image format plugin(s) into the "imageformats" sub-directory.
See one of the many times this has come up
You probably need to deploy the Qt image format plugin(s) into the "imageformats" sub-directory.
See one of the many times this has come up
danilodsp (22nd September 2011), hakermania (9th October 2011)
Read about deploying Qt application
danilodsp (22nd September 2011)
I read about Deploying Qt Applications and realized that I want to do static linking.
I read in the link of Chris, my software also has load jpge, and QPainter.
I used:
Qt Code:
a.addLibraryPath("C:/QtSDK/Desktop/Qt/4.7.4/mingw/plugins"); PDI w; w.show(); return a.exec();To copy to clipboard, switch view to plain text mode
But not working.
I do not understand what is really needed, I thought all the linking .dll was already done automatically by Qt.
It seems complicated.
If you were:
then you have been using dynamic linking. If you are finding that images are not loading then you just need to copy another DLL or two to supply the image plugins. No code changes. It hasn't changed in difficulty at all.normally I copy the libraries .dll for the folder together with the executable. And it always worked.
Qt Code:
C:\Program Files\My Funky Program - program.exe - QtCore4.dll - QtGui4.dll - ... + imageformats - qjpeg4.dll - jgif4.dll - ... + sqldrivers - qsqlite4.dllTo copy to clipboard, switch view to plain text mode
If you want to do static linking then you need to:
- Build Qt for static linking (i.e. the -static configure option)
- Modify your application to arrange static inclusion of the same image format plugins How To
- Build your application
- Deploy your application keeping an eye on your license requirements regarding source/relinking ability if your are using GPL/LGPL.
danilodsp (25th September 2011)
Hi friend,
I understand.
Actually I want the dynamic linking. I kept copying and did not work, I thought I was doing something wrong or different than before, then searched but not found the problem.
I copied everything of: (more than 60 .dll)
C:\QtSDK\Desktop\Qt\4.7.4\mingw\plugins
for my executable.
When it did not work, I copied other .dll of other directories did not work.
Sorry being boring, but I really do not know what's wrong.
On the deployed machine:
- Open a command prompt
- Change directory to the application install directory
- Execute "DIR /s /b"
- Copy and paste the output here
follow:
Qt Code:
C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug>DIR /s /b C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\dialogmedia.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libgcc_s_dw2-1.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqcncodecs4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqcncodecsd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqgif4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqgifd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqglgraphicssystem4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqglgraphicssystemd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqico4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqicod4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqjpcodecs4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqjpcodecsd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqjpeg4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqjpegd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqkrcodecs4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqkrcodecsd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqmng4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqmngd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqsvg4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqsvgd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqsvgicon4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqsvgicond4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqtiff4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqtiffd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqtracegraphicssystem4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqtracegraphicssystemd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqtwcodecs4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\libqtwcodecsd4.a C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\main.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\mediaimg.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\mingwm10.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_dialogmedia.cpp C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_dialogmedia.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_mediaimg.cpp C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_mediaimg.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_pdi.cpp C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_pdi.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_sobre.cpp C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_sobre.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_vishist.cpp C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\moc_vishist.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\PDI.exe C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\pdi.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qcncodecs4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qcncodecsd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qgif4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qgifd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qglgraphicssystem4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qglgraphicssystemd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qico4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qicod4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qjpcodecs4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qjpcodecsd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qjpeg4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qjpegd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qkrcodecs4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qkrcodecsd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qmng4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qmngd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qrc_img.cpp C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qrc_img.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qsvg4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qsvgd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qsvgicon4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qsvgicond4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\QtCored4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\QtGuid4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qtiff4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qtiffd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qtracegraphicssystem4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qtracegraphicssystemd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qtwcodecs4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\qtwcodecsd4.dll C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\sobre.o C:\Users\Danilo\Documents\Processamento de imagens\PDI-build-desktop\debug\vishist.oTo copy to clipboard, switch view to plain text mode
Before, I had placed .dll's the most, unnecessary.
Added after 8 minutes:
When I do debug with Qt Creator then the program works, it loads the image (.jpg) on the label. But when I put the .dll in debug folder then the image does not load anymore.
Even through the Qt Creator, then I delete the folder and do debug by Qt Creator to work.
Capture.jpg
Last edited by danilodsp; 4th October 2011 at 14:34.
I'm discovering something.
I put my .exe in the folder:C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin
and it worked.
It seems that there's something I need, I'll try to find out.
Added after 14 minutes:
YES!
It's working.
Thank you guys, I was copying some .dll (as mingwm10, libgcc_s_dw2-1, QtCored4 and QtGuid4) of other different folder. But it has to be all of:
C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin
I found through of a post by Chris.
Thank you.
Note: does not need plugins imageformats to work.
Last edited by danilodsp; 4th October 2011 at 19:56.
You were not putting the various plugins in the correct folder with respect to the program executable anyway.
But now I have one problem.
The program alone is working in my computer. For other computer, I have that copy all the .dll of the new computer.
And not is working in computer without Qt.
Last edited by danilodsp; 5th October 2011 at 16:01.
I have taken my toy train locomotive to my friend's place but I didn't bring the track. Why doesn't my train go?But now I have one problem.
The program alone is working in my computer. For other computer, I have that copy all the .dll of the new computer.
And not is working in computer without Qt.
Of course you need the Qt runtime libraries and plugins your application uses on the computer that you want to run your dynamically linked Qt application on. All the information you need is in this thread.
Last edited by ChrisW67; 5th October 2011 at 23:32.
Can I separate everything they need (to work on a computer without Qt) along with my executable?
Bookmarks