2

I have been working on a Qt OpenGL project for a bit now for some school work. I had to re-build Qt 5.0.1 for my windows machine so I could use OpenGL proper. At the end of this project I need to turn over the files and any executables, so I figured I could take the release .exe and stick it in a .zip for use.

I followed instructions online of making sure I place any needed .dll's into the .exe's dir. For my project there are 10: icudt49, icuin49, icuuc49, libEGL, libGLESv2, Qt5Core, Qt5Gui, Qt5OpenGL and Qt5Widgets

I took these files all from: C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin

on my system.

Issue is the .exe will run and I get the UI and all. But the OpenGL scene is just black. I can still click objects in the scene, evidently zoom in and out and all that. I assume thats just the Qt translating the commands still. But nothing is visible. I'm unsure what the problem can be because it all works fine when launched from the creator.

EDIT: So, with all the dlls in the release folder, running the project from within creator will also have a black screen, when I remove them, it runs well. So perhaps one of the dll's is just wrong?

Also: I looked online about publishing with Qt Creator and found not too much aid, said I should start from completely rebuilding Qt Creator staticly, but I'm sure the guide I had followed did this, however I still can't publish from the build menu, so I stuck with the above method.

Poken1151
  • 570
  • 5
  • 20
  • Do you need any file to load the scene? – Ian Medeiros Apr 25 '13 at 00:56
  • I'm not clear on the question. I don't use any external libraries or config files. Just whatever Qt provides. In my .pro file I just have QT += core gui opengl widgets, so I included those .dll's. Something else I may be missing? – Poken1151 Apr 25 '13 at 01:33
  • I was asking for some .txt file or something. If not, try to use dependencie walker to find any missing dependencies? http://www.dependencywalker.com/ – Ian Medeiros Apr 25 '13 at 03:08
  • Well I got and tried the tool, the only thing that really happens is it spits out this error; " At least one module has an unresolved import due to a missing export function in an implicitly dependent module." But I've no idea which or if this really has any baring on the program. I do notice I don't see libEGL.dll in its list (but I see all the other dll's I've moved). but so far this has gotten me no where. – Poken1151 Apr 25 '13 at 06:16
  • Well, I rechecked the dlls and they were loaded, just the wrong ones. Now the application will launch on the machine with QT installed, but not on another machine without QT. – Poken1151 Apr 25 '13 at 19:10
  • That's why I recommended the dependencywalker. You was probably loading a different version of QT from a program that was installed on your PC. Does that make sense? – Ian Medeiros Apr 25 '13 at 20:40
  • Yea, I loaded different .dll's and it worked out, I will write an answer for this below. – Poken1151 Apr 25 '13 at 22:13

2 Answers2

1

I suggest, that you open every of the DDLs in your Zip file with Dependency Walker (http://www.dependencywalker.com/). It should display information about dependencies from one of your QtXXX.dll files to other files. If one of the dependencies is missing, you know where to look next. You can also try to open your executable with Dependency Walker. I haven't used the program for a long time so I don't remember if opening an executable is the only way it works. Anyway, here are the reasons why you might want to use the tool: http://www.dependencywalker.com/help/html/overview_1.htm

This question might also be helpful:

At least one module has an unresolved import due to a missing export function in an implicitly dependent module

Good luck!

Community
  • 1
  • 1
Konrad Kleine
  • 4,275
  • 3
  • 27
  • 35
0

So the ultimate issue was the use of the correct DLLs. Using something like DependenyWalker can help you to note which DLLs may be missing, however it did nothing in my case.

I had installed Qt once, and also rebuilt, uninstalled and re-installed it. However all the libraries it was calling from as no longer in C:\Qt\Qt5.0.1\5.0.1\msvc2010\bin as expected, it was calling from the github repository where I built it C:\Users\User\Documents\GitHub\qt5. Once this is sorted out, it still required a framework folder and then it works as expected.

1) Copy the correct DLL files to the release folder of the build.

2) Create a folder in the same dir as the .exe named "platforms". (Note: elsewhere has said create plugins>platforms, but this will not work with newer Qt versions)

3) From the same source you got the other DLLs, copy qwindows.dll to the platforms folder you created.

4) Run the executable and enjoy.

As long as the system you're running on is capable of your OpenGL structure, it should be fine.

Poken1151
  • 570
  • 5
  • 20