Error in application output
-
Hi Everyone,
I am trying to run a simple Qt project which have a lot of sub-directories in it. Till now I just want to check that whether the approach of building a project which deals with sub directories is correct or not. There is no as such code, just a library and main.pro with main.cpp which have just a code to print a message.
I am not getting any compilation error but a message is displayed like this:
Starting /home/pragati/MultiFuncTester/MultiFuncTester/MultiFuncTester...
Failed to start program. Path or permissions wrong?
/home/pragati/MultiFuncTester/MultiFuncTester/MultiFuncTester exited with code -1All the subdirectories are correctly added as desired but I don't know why a simple code is not able to get executed.
I am pasting my main.pro and the lib file here:
MAIN.pro
@
################# include pri file #################
!include("Main.pri") {
error("Main.pri not found")
}
##################################################################### override some pri settings #################
TEMPLATE = app
TARGET = MultiFuncTester
CONFIG -= static
QT += core
gui
############################################################################### list used MultiFuncTester libraries #################
MultiFuncTester_COMPONENTS_DIR =../../MultiFuncTester/Components################ list MultiFunTester libraries #################
MultiFunTester_COMPONENTS_DIR =../../MultiFuncTester/Components
MultiFunTester_COMPONENTS = DMM
SOLAR
Safety
Setup###########################################################
################# own sources #################
INCLUDEPATH += ../../MultiFuncTester/Components
HEADERS +=
SOURCES +=../Source/Main.cpp \###############################################
###########################################################################################
################# DO NOT TOUCH THIS UNLESS YOU KNOW WHAT YOU ARE DOING!!! #################
############################################################################################################ set destination path
DESTDIR = bin_$$CONFIG_SUFFIX################# edit include path
INCLUDEPATH += $$MultiFunctester_COMPONENTS_DIR \################# start group
LIBS += -Wl,--start-group \################# include MultiFunctester libraries and set dependencies
for(TheComponent, MultiFunctester_COMPONENTS) {
THELIBPATH = $$MultiFunctester_DIR/$${TheComponent}/Build/lib_$$CONFIG_SUFFIX
PRE_TARGETDEPS += $$THELIBPATH/lib$${TheComponent}.a
LIBS += $$THELIBPATH/lib$${TheComponent}.a
}################# end group
LIBS += -Wl,--end-group@
Project's pri file: (MultiFunctester.pri)
@
######################common stuff for all components
######################
TEMPLATE = lib
CONFIG += static
warn_on
qt
thread
rttiQT += core
guiINCLUDEPATH +=/..
../../MultiFuncTester/Components \DEPENDPATH +=/..
../../MultiFuncTester/Components \CONFIG += debug_and_release
CONFIG += build_allQMAKE_CXXFLAGS += -Wall
CONFIG(debug, debug|release) {
CONFIG_SUFFIX = dbg
} else {
CONFIG_SUFFIX = rel
DEFINES += QT_NO_DEBUG
QT_NO_DEBUG_OUTPUT
DBT_TRACE_DISCARD
NDEBUG
CONFIG(gcov) {
QMAKE_CXXFLAGS_RELEASE += -fprofile-arcs -ftest-coverage
QMAKE_LFLAGS_RELEASE += -fprofile-arcs
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE += -O0
}
}CONFIG(crosstgt) {
To be able to build Target run qmake as follows:
#qmake CONFIG+=crosstgt
CONFIG_SUFFIX = $${CONFIG_SUFFIX}_tgt
DEFINES += TARGET_BUILD
}OBJECTS_DIR = obj_$${CONFIG_SUFFIX}
MOC_DIR = moc_$${CONFIG_SUFFIX}
DESTDIR = lib_$${CONFIG_SUFFIX}######################
@