Results 1 to 4 of 4

Thread: Error on executing "qmake ; make"

  1. #1
    Join Date
    Jun 2016
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Error on executing "qmake ; make"

    Hello. ( I use KUbuntu 16.04 and Qt Creator 3.6.1 based on Qt 5.6.0)
    I've been trying to run tests. My tests exists in digikam-software-compilation/core/tests/database folder

    I go to the above folder in terminal and run "qmake ; make" command. A database.pro file is created.

    Qt Code:
    1. ######################################################################
    2. # Automatically generated by qmake (2.01a) Tue Jun 14 14:57:30 2016
    3. ######################################################################
    4.  
    5. CONFIG+=qtestlib
    6. TEMPLATE = app
    7. TARGET =
    8. DEPENDPATH += .
    9. INCLUDEPATH += /home/swati/digikam-software-compilation/core/libs/database/coredb/
    10.  
    11. # Input
    12. HEADERS += databasefieldstest.h databasetagstest.h
    13. SOURCES += databasefieldstest.cpp databasetagstest.cpp testdatabase.cpp
    To copy to clipboard, switch view to plain text mode 

    Now, there was only one file ( #include "coredbfields.h") in databasefieldstest.cpp and for that I've already added the path in INCLUDEPATH above.

    If I run "qmake ; make" again, I get error for the files included in the include file i.e "coredbfields.h"
    I tried to include that file too, i again gave error for the next included file.... This way I'm getting recursive errors.

    Please tell me how to fix this?
    I want to implement unit tests.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Error on executing "qmake ; make"

    If there was no .pro file in that directory, then it might be that it can't be built stand alone.

    Looks for the program's main build file.

    Since this is DigiKam there might be a CMakeLists.txt at the top level of the source dir.

    Cheers,
    _

  3. #3
    Join Date
    Jun 2016
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Error on executing "qmake ; make"

    Yes, there exists a CMakeLists.txt file in the same directory...

    How would it help?
    Please tell. I'm doing it for first time.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Error on executing "qmake ; make"

    CMake, like qmake, is a build system generator.

    Its input files are not .pro files but CMakeLists.txt files.

    QtCreator can load those as well.

    On the command line it would be like this:

    For building in the source directory, i.e. the dir CMakeLists.txt is in
    Qt Code:
    1. cmake .
    To copy to clipboard, switch view to plain text mode 

    For building inside a sibdirectory of the source directory
    Qt Code:
    1. cmake ..
    To copy to clipboard, switch view to plain text mode 

    For building outside the source directory, e.g. a separate build dir as a sibling directory of the source dir
    Qt Code:
    1. cmake ../sourcedir
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

Similar Threads

  1. Replies: 11
    Last Post: 30th March 2015, 06:03
  2. qmake: "error(message) requires one argument"
    By trallallero in forum Qt Programming
    Replies: 0
    Last Post: 19th November 2013, 10:47
  3. Replies: 1
    Last Post: 28th November 2010, 17:16
  4. Replies: 3
    Last Post: 15th February 2010, 17:27
  5. Replies: 3
    Last Post: 8th July 2008, 19:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.