Results 1 to 3 of 3

Thread: Qt cannot find header files but has autocompletion

  1. #1
    Join Date
    Feb 2018
    Posts
    22
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Qt cannot find header files but has autocompletion

    Hey,

    I have built a Qt application with Qwt.
    It compiles and runs fine on my machine, but when i try to compile it on a jenkins Slave running windows server 2008, it says:

    Qt Code:
    1. qwt_plot.h: No such file or directory
    To copy to clipboard, switch view to plain text mode 

    It's just an example. It cannot find any of the Qwt headers.
    However, when typying
    Qt Code:
    1. #include "qwt_plot.h"
    To copy to clipboard, switch view to plain text mode 
    it has autocompletion for the header name

    The Qwt headers are included in the .pro file:

    Qt Code:
    1. LIBS += \
    2. -L$$PWD/../../../../../../QwtRelease/Qwt-6.1.3/lib/ \
    3. -lqwt \
    4. -L$$PWD/../../../../../../QwtRelease/Qwt-6.1.3/lib/ \
    5. -lqwtd
    6. INCLUDEPATH += $$PWD/../../../../../../QwtRelease/Qwt-6.1.3/include
    To copy to clipboard, switch view to plain text mode 

    I know the path looks ugly, but right now i just want it to run.

    I also tried replacing it with

    Qt Code:
    1. LIBS += \
    2. -LC:/QwtRelease/Qwt-6.1.3/lib/ \
    3. -lqwt \
    4. -LC:/QwtRelease/Qwt-6.1.3/lib/ \
    5. -lqwtd
    6. INCLUDEPATH += C:/QwtRelease/Qwt-6.1.3/include
    To copy to clipboard, switch view to plain text mode 

    But that had no effect either.

    I read somewhere that you could also use

    Qt Code:
    1. include("C:/QwtRelease/Qwt-6.1.3/features/qwt.prf")
    To copy to clipboard, switch view to plain text mode 

    But that has no effect either.

    I have added the Qwt lib path to the environment on the machine.
    I also tried deleting the build folder and rebuilding it.

    Specifying the full path works, e.g:
    Qt Code:
    1. #include "C:/QwtRelease/Qwt-6.1.3/include/qwt_plot.h"
    To copy to clipboard, switch view to plain text mode 

    As i stated, it works on my own machine running windows 10 but not on the jenkins slave running windows server 2008.

    Can you help me find the error?

    Best regards

    David

  2. #2
    Join Date
    Feb 2018
    Posts
    22
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt cannot find header files but has autocompletion

    Turns out i forgot about "pri." file i included in the project. This file naturally overwrote the settings i made.

    After fixing it, i could compile again

  3. #3
    Join Date
    Feb 2018
    Posts
    22
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt cannot find header files but has autocompletion

    This post has absolutely nothing to do with Epson printer.

Similar Threads

  1. Two UI files, one header/CPP - is it possible?
    By LostSoul in forum Qt Programming
    Replies: 1
    Last Post: 23rd April 2015, 18:24
  2. Replies: 3
    Last Post: 22nd May 2013, 01:08
  3. Replies: 3
    Last Post: 22nd February 2013, 13:05
  4. Editor unable to find Header Files
    By weaver4 in forum Qt Tools
    Replies: 4
    Last Post: 11th May 2012, 22:52
  5. Replies: 2
    Last Post: 30th September 2010, 13:26

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.