[SOLVED] NEW and CONFUSED
-
Sorry, I missed your last post.
"PLUGINS\Qwindows.dll" should be "platforms\qwindows.dll"
You have both Qt 4 (QtCore4.dll, QtGui4.dll) as well as Qt 5 (Qt5Core.dll, Qt5Gui.dll) DLLs -- those don't go together. Uninstall Qt 4 from your system completely and remove the Qt 4 DLLs. Then, delete these and re-compile your project
- Qt-Ttutorial-01.exe
- moc_widget.cpp
- *.o
Get rid of api-ms-win-core-console-l1-1-0.dll and IEShims.dll -- those are system DLLS which you shouldn't need to deploy (Dependency Walker gave you false warnings here)
[quote]Some show up in 2 different locations and file sizes: one in MingW and also in Qt. I selected the mingw files. [/quote] Use the ones in the "Qt" folder. Also, please list the DLLs that you found in two places.
Some questions:
- Did you uninstall Qt 5.0.2 before trying to compile with Qt 5.1? If not, uninstall Qt 5.0.2
- Do you have multiple installations of MinGW in your computer? If you do, uninstall all others except for the one that came with Qt.
-
Thanks for your reply.
I've performed your last suggestions, and now get these errors:When clicking Qt-Ttutorial-01.exe from RELEASE folder:
- The procedure entry point
_Z8qWinMainP11HINSTANCE_S0_PciRiR7QVectorIS1_E could not
be located in the dynamic link library Qt5Core.dll.
When running release build from Qt Creator (Qt-Tutorial-01.pro):
- Starting C:\Users\Steve\Desktop\Qt_Tutorials\Qt-Tutorial-01\build-Qt-Ttutorial-01-Desktop_Qt_5_1_0_MinGW_32bit-Release\release\Qt-Ttutorial-01.exe...
The program has unexpectedly finished.
C:\Users\Steve\Desktop\Qt_Tutorials\Qt-Tutorial-01\build-Qt-Ttutorial-01-Desktop_Qt_5_1_0_MinGW_32bit-Release\release\Qt-Ttutorial-01.exe exited with code -1073741511
3. Running from the DEBUG build (in Qt Creator) works properly.
- The procedure entry point
-
[quote author="nHx4U" date="1374110617"]
- The procedure entry point
_Z8qWinMainP11HINSTANCE_S0_PciRiR7QVectorIS1_E could not
be located in the dynamic link library Qt5Core.dll.[/quote]That means the program is using the wrong version of the DLL.
Question: Are you absolutely sure that you only have 1 version of Qt in your computer, and you have uninstalled all other versions?
Do this first:
Delete the folder C:\Users\Steve\Desktop\Qt_Tutorials\Qt-Tutorial-01\build-Qt-Ttutorial-01-Desktop_Qt_5_1_0_MinGW_32bit-Release
Build your project again in Qt Creator
Copy the DLLs that you need from C:\Qt\Qt5.1.0\mingw48_32\bin -- (if this is NOT where your DLLs are found, tell us the full directory)
Secondly, open a Windows Command Prompt (click Start -> Run, type in "cmd", and press Enter). Run this command...
@
path > C:\Users\Steve\Desktop\path.txt
@
...then open the text file on your desktop and paste the result here.[quote author="nHx4U" date="1374110617"]I’ve performed your last suggestions[/quote]Please be more descriptive in the future, and give step-by-step details of what you did. If you just say "I’ve performed your last suggestions", I can't tell if you performed it correctly or not.
- The procedure entry point
-
TO: JKSH (and others who have responded). Thank you very much.
I have performed tasks 1,2,3 above AND it actually works! :-)Below is list of files and locations. Actual DLLs used were copied from Qt..\mingw subfolder.
FOLDER
C:\USERS\STEVE\DESKTOP\Qt_TUTORIALS\Qt_TUTORIAL-01\ File Source File Size - KB Alternate Location Alternate Size - KB1 D3DCompiler_43.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 2057 C:\windows\SysWOW64\ 2057
2 icudt51.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 21794 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 21854
3 icuin51.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 1726 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 3291
4 icuuc51.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 1266 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 1933
5 libEGL.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 47 n/a
6 libgcc_s_dw2-1.dll C:\Qt-51\Qt5.1.0\5.1.0\mingw48_32\bin\ 533 C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin\ 533
7 libgcc_s_sjlj-1.dll C:\Program Files\PostgreSQL\9.2\bin 76 C:\Program Files\PostgreSQL\9.2\bin\postgisgui 40
8 libGLESv2.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 712 n/a
9 libstdc++-6.dll C:\Qt-51\Qt5.1.0\5.1.0\mingw48_32\bin\ 967 C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin\ 967
10 libwinpthread-1.dll C:\Qt-51\Qt5.1.0\5.1.0\mingw48_32\bin\ 73 C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin\ 73
11 mingwm10.dll C:\Program Files(x86)\PostgreSQL\UpdateMonitor\bin 16 n/a
12 Qt5Core.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 3764 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 4287
13 Qt5Gui.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 2856 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 4346
14 Qt5Multimedia.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 528 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 797
15 Qt5MultimediaWidgets.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 74 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 124
16 Qt5Network.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 806 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 1361
17 Qt5OpenGL.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 238 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 392
18 Qt5Widgets.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 4170 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 6003
19 Qt-Ttutorial-01.exe Created by Qt Creator 44 n/a
\PLATFORMS\ n/a
1 Qwindows.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\plugins\platforms 814 n/a(Above would be clearer if one could include attachments or at least have a horizontal scroll in this window)
HERE IS THE PATH FILE:
PATH=C:\Python27;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn;c:\sdc\orant\bin;c:\sdc\oraclexe\app\oracle\product\10.2.0\server\bin;c:\sdc\unix;C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn;C:\Program Files (x86)\AgentOffice;C:\Program Files (x86)\Calibre2;H:\QuickTime\QTSystem\
How does one know which files to include in the release folder - Other than "Dependency Walker"? When a particular DLL shows up in both Qt and mingw do you always choose the mingw? The mingw files are typically larger than the ones in the Qt folder.
I will now go on to attempt something more complex.
Thanks for all your help. Really appreciate it.
-
Glad to hear! :) I hope you have fun exploring what Qt has to offer. If you have any more questions, please feel free to ask in these forums, and I'm sure someone will try to help you.
From this exercise, the take-home messages are:
- Be aware of the libraries that you're using.
** If there are multiple versions on your computer, always ensure that you are linking to the correct version, and that you copy the correct DLLs - When you upgrade or change something (such as your libraries, or even your source code), you may need to delete your previously-compiled files because they could be linked to old libraries
** Some problems can be solved by deleting those files and re-compiling from scratch, like what you just did
[quote]
File Source File Size – KB Alternate Location Alternate Size – KBQt5Core.dll C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\ 3764 C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\ 4287[/quote]Actually...
This folder contains your Qt library (YOU SHOULD COPY THESE DLLS FOR YOUR STANDALONE APPLICATION):
- C:\Qt-51\Qt5.1.0\5.1\mingw48_32\bin\
This folder contains the Qt Creator IDE (code editor), not your Qt library
- C:\Qt-51\Qt5.1.0\Tools\QtCreator\bin\
This folder contains your MinGW compiler
- C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin
Qt Creator is a standalone application. Its DLLs could be older than your library, so you don't want to copy those!
- Be aware of the libraries that you're using.
-
I also have the same problem.
My Application is based on Qt5.1
My system used:- Qt5.1
- Mingw32
I can't find the mingw10.dll and libgcc_s_sjlj-1.dll in C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin.
Please help to deploy application compiled in mingw to other window PC.
-
[quote author="vtong" date="1375093795"]I also have the same problem.
My Application is based on Qt5.1
My system used:- Qt5.1
- Mingw32
I can't find the mingw10.dll and libgcc_s_sjlj-1.dll in C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin.
Please help to deploy application compiled in mingw to other window PC.[/quote]Which Qt package did you download? (Please provide the full link)
Where did you install MinGW?
-
[quote author="JKSH" date="1375097634"][quote author="vtong" date="1375093795"]I also have the same problem.
My Application is based on Qt5.1
My system used:- Qt5.1
- Mingw32
I can't find the mingw10.dll and libgcc_s_sjlj-1.dll in C:\Qt-51\Qt5.1.0\Tools\mingw48_32\bin.
Please help to deploy application compiled in mingw to other window PC.[/quote]Which Qt package did you download? (Please provide the full link)
Where did you install MinGW?[/quote]
Thanks for your response.
I downloaded the Qt5.1 from: http://download.qt-project.org/official_releases/qt/5.1/5.1.0/qt-windows-opensource-5.1.0-mingw48_opengl-x86-offline.exe
After I installed, I have a folder: C:\Qt\Qt5.1.0
I used all library from: C:\Qt\Qt5.1.0\5.1.0\mingw48_32\bin
I searched and found a lot solution but no ones work for me.
Note: I use Qwt-6.1.0 in my application, I build and install it by Command Prompt from Qt the I installed -
The MinGW in that package uses Dwarf-2 instead of SJLJ, so replace libgcc_s_sjlj-1.dll with libgcc_s_dw2-1.dll.
Also, MinGW has changed: you don't need mingwm10.dll anymore, but you now need libwinpthread-1.dll
-
@JKSH: Thanks for your advice.
I did copy all the files you mention to application folder, I all so put platform folder as well.
But somehow the application still show Visual C++ Runtime error when I run it in other PC.
Very confused now.
Please advice.
Thanks -
If it's showing a Visual C++ error, that means your binary was compiled with Visual Studio, not MinGW... Check that:
You are using the correct Qt package
You are using the correct compiler
-
I used MingW, to make sure nothing wrong, I removed the msvc-2010 from the Qt installed directory, but the error still happened.
It pop up a window with message: "This application has requested the Rumtime to terminate it in an unsual qat. Please contact...." -
"This application has requested the Runtime to terminate it in an unusual way" is definitely a Visual Studio message. You need to clean your environment.
Uninstall all versions of Qt except for the MinGW one. Remove Visual Studio from your PATH. Delete your *.o and *.exe files and recompile.
If you still can't solve the problem, uninstall Visual Studio and try again.
-
Hi JKSH,
I did all things you mention, but when I run my app on another PC, it pop up another message: "The application failed to start because it could not find or load platform plugin "windows". Reinstalling the application may fix this problem"
When I click OK, it come with Visual C++ Runtime library error.
Don't know why this happen, even I copy the platforms/qwindows.dll from mingw_32/bin.
Any idea to fix this? -
Can you run the application from your development PC, in Qt Creator?
Can you run the application from your development PC, outside of Qt Creator (double-click the .exe)?
Did you install Qt on your other PC? You must not have Qt in your PATH. If you do, your application might try to use the wrong version of DLLs.
qwindows.dll must be in a subfolder:
myapp\myapp.exe
myapp\Qt5Core.dll
myapp\platforms\qwindows.dll -
[quote author="JKSH" date="1375235308"]# Can you run the application from your development PC, in Qt Creator?
Can you run the application from your development PC, outside of Qt Creator (double-click the .exe)?
Did you install Qt on your other PC? You must not have Qt in your PATH. If you do, your application might try to use the wrong version of DLLs.
qwindows.dll must be in a subfolder:
myapp\myapp.exe
myapp\Qt5Core.dll
myapp\platforms\qwindows.dll[/quote]I put app and dlls as the same as your suggestion.
To answer your questions:
1/ I can run the app from Qt Creator (Press Run button).
2/ I can't run the app outside Qt Creator, double-click exe from Release folder or from other folder, I must copy all requred dlls to the app folder to make it run.
3/ The other PC is fresh, no Qt Installed. -
[quote author="vtong" date="1375244963"]
[quote author="JKSH" date="1375235308"]# Can you run the application from your development PC, in Qt Creator?Can you run the application from your development PC, outside of Qt Creator (double-click the .exe)?
Did you install Qt on your other PC? You must not have Qt in your PATH. If you do, your application might try to use the wrong version of DLLs.
qwindows.dll must be in a subfolder:
myapp\myapp.exe
myapp\Qt5Core.dll
myapp\platforms\qwindows.dll[/quote]I put app and dlls as the same as your suggestion.
To answer your questions:
1/ I can run the app from Qt Creator (Press Run button).
2/ I can't run the app outside Qt Creator, double-click exe from Release folder or from other folder, I must copy all requred dlls to the app folder to make it run.
3/ The other PC is fresh, no Qt Installed.[/quote](UPDATE):
I just do REcompile with a fresh project from my github:
I clean all file from Release folder, remove some path in PATH, remove Visual Studio.
Recompile and Run from Qt Creator, it show the Visual C++ Runtime Library.
Please advise, thanks -
Hmm... Please open your project in Qt Creator and provide screenshots of the following:
- (Top menu bar) -> Tools -> Options -> Build & Run -> Compilers
- (Top menu bar) ->Tools -> Options -> Build & Run -> Kits
- (Left menu bar) -> Projects
quote author="vtong" date="1375245456":
I just do REcompile with a fresh project from my github:[/quote]Is this the same project that you are trying to run on your other PC? Can you provide a GitHub link?