Re: [URGENT]Can't run .exe outside QT5
Quote:
Originally Posted by
alrawab
to be used by multiple people.... you have to include the run time dependencies or build a static app
add this line to your .pro
I added the line you said. My .pro is now:
Code:
#-------------------------------------------------
#
# Project created by QtCreator 2012-12-28T05:07:27
#
#-------------------------------------------------
QT += core gui
CONFIG += static
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = GraphIt
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
about.cpp \
graph.cpp \
fullgraph.cpp
HEADERS += mainwindow.h \
about.h \
graph.h \
fullgraph.h
FORMS += mainwindow.ui \
about.ui \
graph.ui \
fullgraph.ui
It still asked me for the .dll upon opening
Re: [URGENT]Can't run .exe outside QT5
Quote:
Originally Posted by
bshikari
since i'm programming an application to be used by multiple people, not all of them with Qt installed. It would be preferable that it was a standalone .exe. but it's critical that it works on all computers
If you want a static build of the application then you need to build Qt statically and have static versions of all Qt's dependencies. I'd advise against that if you don't feel comfortable with controlling the linker. I suggest you try to fix your dynamic deployment instead. If you have a 32bit build of Qt then you need 32bit msvc runtime. You can start by dumping all dlls from your Qt installation's bin directory into the same directory your exe sits in and see if it works. If yes then you can start eliminating libraries your application doesn't use. If not then it's likely that the problem is unrelated to dynamic linking.
Do not modify any system paths and do not copy anything else anywhere and do not modify your project file in any way.