Niklas
Niklas

Reputation: 25391

Build program with QT 5.0.2 on Windows

I want to build my program(developed with QT 5.0.2) and give it to some friends.

How can I process?

I tried qmake -project and qmake in my folder with the *.cpp files, but it didn't create any exe.

This is my .pro file

#-------------------------------------------------
#
# Project created by QtCreator 2013-08-03T18:53:41
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = target
TEMPLATE = app


SOURCES += main.cpp\
        class1.cpp\
        class2.cpp\
        class3.cpp\
        class4.cpp

HEADERS  += class1.h\
            class2.h\
            class3.h\
            class4.h

FORMS    += class1.ui\
            class3.ui

Upvotes: 0

Views: 125

Answers (2)

Reza Ebrahimi
Reza Ebrahimi

Reputation: 3689

Have you compiled your QtSDK statically? if yes, you can build your project as static linking, either you can't, if your are manually download your Qt repository from qt-project.org, it is a shared version of Qt, you should remove the line contain CONFIG += static and compile your project as shared and add the line below to your .pro file:

QT    += core gui

Note:

Use Qt Creator as Qt Framework IDE to manage and build your projects, it's really handy and great tool, another way is use Visual Studio Add-In that integrates with VStudio, if you are professional in Qt architecture, you can use makefile base building of Qt withqmake.

Upvotes: 1

Related Questions