Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
645 views
in Technique[技术] by (71.8m points)

qt - qtcreator - exe does work fine inside qtcreator but doesn't outside

I want to give a friend of mine a release build of a little project. It works perfectly fine when started from inside qtcreator, but doesn't open when double-clicked on the .exe file. It doesn't even give me an error message.

Now when I tried to copy a few Qt .dll files (like Qt5Core.dll, Qt5Gui.dll, Qt5Widgets.dll) next to my exe file, it didn't change anything. How can I know what dependencies my project has? The .pro file doesn't tell me so much

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = project1
TEMPLATE = app


SOURCES += main.cpp
    mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui

I'm working on Windows 7 (64 bit), Qt Creator 2.6.1 based on Qt 5.0.0 (32 bit)

thanks for any help Sadik

edit: solution can be seen in my answer

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Solved it! All I had to do was to download "libEGL.dll" and put it in the directory where my exe file is located. Of course all the other .dll files from qt were needed, too. But these were explicitly mentioned in an error message. But for the "libEGL.dll" there is not even an error message. The .dll files that were listed in "dependency walker" can be ignored. For my problem this tool didn't really help. It didn't list the libEGL.dll but listed other .dll files which are in fact unused.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...