Build not successful for a non QT project



  • I am having this build error while building a non qt c++ application using mingW compiler.
    I am not able to figure out the reason behind the fail, can someone help me please regarding this matter.
    I am attaching the image of the error screen.
    @
    warning: overriding recipe for target 'release/orexception.o'

    warning: ignoring old recipe for target 'release/orexception.o'*
    @
    similar 7-8 warnings and 1 error:
    @
    C:\prj\ormut.cpp: 15: error: ormutex.h: No such file or directory
    #include "ormutex.h" // class ORMutex
    ^
    @
    Thanks in advance.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Where's ormutex.h located ? Did you add that path to your INCLUDEPATH variable in your pro file ?



  • Yes I tried both Absolute and Relative path in in INCLUDEPATH variable in .pro file. What should be the location of .pro file ??

    Thanks!!



  • Hi SGaist,

    As I am new to QT so I am sending all the steps I followed before building the project. Please tell me if somewhere I did something wrong. These steps will help you to narrow down the cause of the problem.

    Steps I followed:

    I have all the source and header files so,

    Step1. New Project -> Import Project -> Import Existing Project <Choose Project Name as "Demo"> -> <location "C:\Documents\TXX" > and then finish.
    path "C:\Documents\TXX" contains all my header files and source files.

    Step2. Now I have files named Demo.files, Demo.includes, Demo.config and Demo.creator in location "C:\Documents\TXX".

    Step3. Now to generate .pro file, hence I opened the Command Prompt (QT 5.3 for Desktop(MingW 4.8 32 bit)) and jumped into location "C:\Documents\TXX", and generated ".pro file and make files" by using commands:
    1. qmake -project => TXX.pro got generated in the same location.

               2. qmake -o Makefile TXX.pro => Makefile, Makefile.Release and Makefile.debug got generated in same location.
    

    Step4. I modified my .pro file as :
    TEMPLATE = app => modified to => TEMPLATE = lib (since I want .dll file to be generated)
    TARGET = TXX
    INCLUDEPATH += {I tried it with both Absoulte and Relative paths but no benefit}.
    CONFIG += build_all {just for experiment but it has no side effect} HEADERS += <path to all header files inside TXX>
    SOURCES += <path to all source files inside TXX>

    Step5. I also explicitly tried to add path into qt explorer but no benfit;
    tools->options-> under C++ sections -> File Naming tab -> search paths : I added the same path to ORMutex.h => no benefit.

    When I try to build/rebuild the project, I get some warnings followed by one error.
    Warnings: overriding/ignoring recipe/old recipe for targer release/.o files in file "Makefile.release".
    Error: 'ORmutex.h' no such file or directory, However when I hover down my cursor over ORmutex,h where error had come, I can see the location of the header file that means file is present there.

    What could be the cause of the issue.
    Please analyse.

    Thanks and Best Regards,
    Abhishek


  • Lifetime Qt Champion

    Can you show your pro file content ?



  • @
    TEMPLATE = lib
    TARGET = STT
    INCLUDEPATH += path to XXT folder <I tried with relative path also>
    CONFIG += build_all

    Input

    HEADERS += swtdus_swtools/stt/aeneasversion.h
    swtdus_swtools/sttdecoder_3gfw/sttdecoder_3gfw.h
    <other header files>
    SOURCES += swtdus_swtools/baselibs/src/orexception.cpp
    swtdus_swtools/baselibs/src/ormutex.cpp
    <other source files>
    @

    Thanks !!


  • Lifetime Qt Champion

    Are you using the unix notation for all your paths ?



  • INCLUDEPATH += C:/Users/mishraab/Documents/XXT/ I am using this notation, I had tried with black slash also.



  • header and source paths ate automatically generated.


  • Lifetime Qt Champion

    [quote author="mishraab" date="1418285012"]header and source paths ate automatically generated.[/quote]

    What do you mean by that ?



  • When we generate .pro file using command : "qmake -project", the path to all header files and source files got copied to .pro file automatically.
    I followed the same notation (for path) in my INCLUDEPATH variable.

    I was trying to say this. What could be the problem ?? any idea?


  • Lifetime Qt Champion

    Something's not clear:
    You have

    @C:\prj\ormut.cpp:@

    and

    @swtdus_swtools/baselibs/src/orexception.cpp@

    Are these files in the same folder ?



    1. C:\prj\ormut.cpp: where is this file?

    Are you talking about ormutex.cpp ???? in swtdus_swtools/baselibs/src directory, i have 2 files ormutex.cpp and orexception.cpp; in the same folder.


  • Lifetime Qt Champion

    [quote author="mishraab" date="1418107574"]
    similar 7-8 warnings and 1 error:
    @
    C:\prj\ormut.cpp: 15: error: ormutex.h: No such file or directory
    #include "ormutex.h" // class ORMutex
    ^
    @
    Thanks in advance.[/quote]

    That one


  • Lifetime Qt Champion

    Yes, that's clear. The question is: where is that file and ormutex.h exactly located ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.