Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error in application output
Forum Updated to NodeBB v4.3 + New Features

Error in application output

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pragati
    wrote on last edited by
    #1

    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 -1

    All 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
    rtti

    QT += core
    gui

    INCLUDEPATH +=/..
    ../../MultiFuncTester/Components \

    DEPENDPATH +=/..
    ../../MultiFuncTester/Components \

    CONFIG += debug_and_release
    CONFIG += build_all

    QMAKE_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}

    ######################
    @

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pragati
      wrote on last edited by
      #2

      Even no one replied...but still the code is working now, it was just run settings of creator which had to be checked.....:)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved