Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Building on Windows requires INCLUDEPATH += .

Building on Windows requires INCLUDEPATH += .

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 2.7k 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.
  • W Offline
    W Offline
    wrosecrans
    wrote on last edited by
    #1

    I have been working on an application on Linux, and I was working on Linux today. I have a bunch of classes in subdirectories of the project's root. (i.e., $PROJECT/audio/myaudioclass.h). When I first tried to build on Windows, I got build errors on the includes. Doing "Follow symbol under cursor" in the editor would go to the header file without any problem. I added "INCLUDEPATH += ." to my .pro file, and that made the problem go away. But, I still don't really understand why I ran into this issue. Is this expected behavior on Windows vs. Linux, or have I just got something screwed up in the configuration? Has anybody run into this sort of thing before?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Could you show your pro file and the folder structure of your project ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wrosecrans
        wrote on last edited by
        #3

        This is the .pro file I am currently building with. (Some of the cpp and h files have been trimmed for brevity, but this should be enough for the gist.) If I comment out the INCLUDEPATH line that adds ., I get "fatal error C1083: Cannot open include file: 'audio/tlaudiobuffer.h': No such file or directory"

        Building with MSVC 2012 32 bit. (Same behavior with 64 bit, with adjustments to paths to get the 64 bit builds of the relevant libraries)

        @#-------------------------------------------------

        Project created by QtCreator 2013-09-12T18:18:14

        #-------------------------------------------------

        QT += core gui multimedia

        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

        TARGET = Timelines
        TEMPLATE = app

        SOURCES += main.cpp
        mainwindow.cpp
        ui/tlviewer.cpp
        audio/tlaudiooutput.cpp
        audio/tlaudioqtoutput.cpp
        audio/tlaudiobuffer.cpp
        ui/tleditorwindow.cpp
        io/tljsonfileio.cpp

        HEADERS += mainwindow.h
        ui/tlviewer.h
        audio/tlaudiooutput.h
        audio/tlaudioqtoutput.h
        audio/tlaudiobuffer.h
        ui/tleditorwindow.h
        io/tljsonfileio.h

        FORMS += mainwindow.ui

        unix:LIBS += -L/usr/local/lib -lffms2
        unix:INCLUDEPATH += /usr/local/include/
        win32:INCLUDEPATH += .
        win32:INCLUDEPATH += C:/Users/will/Documents/development/ffms/include
        win32:LIBS += C:/Users/will/Documents/development/ffms/build-msvc/win32/Debug/ffms2.lib "C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86/Ole32.lib"

        @

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Well, I must say that I'm surprised that you didn't had the same problem on linux.

          Could you diff the two Makefiles generated to see the differences in the include path ? Also, are you using the same Qt/QtCreator combo on both platforms ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • W Offline
            W Offline
            wrosecrans
            wrote on last edited by
            #5

            I did have a different Qt version between Windows and Linux, but I have since upgraded both to 5.1 and it's still something I only see on Windows. In any event, the application has grown a bit and the .pro is now split out into a .pro and some .pri. It's all building as long as I have the win32:INCLUDEPATH line in there. I don't have another Windows box to test with at the moment for comparison, so I am willing to consider it just something weirdly configured on that machine.

            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