QtGuid4 was not found?
Hi everyone, after I finish a project, It usually have 2 folder, folder 1 is source code, folder 2 is build-desktop. I want share folder build-desktop for friends but having few problems. When I try running file .exe inside folder build-desktop. It display error dialog.
I can't send it for my friend because I ensure they also encounter this error. I try running project on Qt creator. It operates normal. I don't know reason why?
If you want to run the application from outside Qt Creator, the application has to be able to find all the DLLs it uses, including the Qt DLLs. So you either have to change your PATH to include all the directories where DLLs used by your application resides, or copy the DLLs to the same folder as your application (or another directory that is already in your PATH).
Really I still don't understand exactly what you talked. Case 1: If I must add some codes to point path to location of file .dll inside Qt SDK. Maybe I will correct problem but ... when I publish to client. Clearly their machine don't have any file .dll. Case 2: If I copy and paste file QtGuid4.dll to project. I don't know where it locate inside Qt SDK?
Well, if you don't know how to locate a file on your computer, maybe it's time to learn how to do that... :)
You will have to distribute the necessary .dlls with your .exe. The only way around this is to statically link. Statically linking is (usually) not preferred because it leads to large .exe files, which are difficult to update. In addition, it causes license issues, as you are including source with different licenses.
If you really want to statically link, do a google search for QT Designer static link and you'll find tutorials on how to set it up.
If you make the choice to stay with dynamic linking, I recommend (and so does QT) using Dependency Walker, which can be downloaded for free. It will tell you all the dlls that the application needs.
The QT libraries will be in your QT directory.
If you compile with mingw, you'll want the dlls from C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin (or something similar to that).
If you compile with VS, you want the dlls from C:\QtSDK\QtCreator\bin
mingw will also require two dlls in order to run programs in windows. These can be found in the same directory structure, C:\QtSDK\mingw\bin