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. Non-portable path to file warning. Why?
QtWS25 Last Chance

Non-portable path to file warning. Why?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.3k Views
  • 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.
  • B Offline
    B Offline
    bogong
    wrote on last edited by bogong
    #1

    Hello all!
    Started seeing this message:

    /Users/alexandr/Projects/build-Desktop_Qt_5_15_2_clang_64bit-Debug/moc_shttpreplyuserlogin.cpp:10: warning: non-portable path to file '"../../DataStorage/DataModels/HTTPReply/shttpreplyuserlogin.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
    moc_shttpreplyuserlogin.cpp:10:10: warning: non-portable path to file '"../../DataStorage/DataModels/HTTPReply/shttpreplyuserlogin.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
    #include "../../DataStorage/DataModels/HTTPreply/shttpreplyuserlogin.h"
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             "../../DataStorage/DataModels/HTTPReply/shttpreplyuserlogin.h"
    

    Why is that?

    in *.pro file:

    INCLUDEPATH += $$PWD/DataModels/HTTPReply
    

    in *.h:

    #include <shttpreplyuserlogin.h>
    

    Everything works fine. Just this warning. Is it Qt bug?

    JonBJ 1 Reply Last reply
    0
    • B bogong

      Hello all!
      Started seeing this message:

      /Users/alexandr/Projects/build-Desktop_Qt_5_15_2_clang_64bit-Debug/moc_shttpreplyuserlogin.cpp:10: warning: non-portable path to file '"../../DataStorage/DataModels/HTTPReply/shttpreplyuserlogin.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
      moc_shttpreplyuserlogin.cpp:10:10: warning: non-portable path to file '"../../DataStorage/DataModels/HTTPReply/shttpreplyuserlogin.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
      #include "../../DataStorage/DataModels/HTTPreply/shttpreplyuserlogin.h"
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               "../../DataStorage/DataModels/HTTPReply/shttpreplyuserlogin.h"
      

      Why is that?

      in *.pro file:

      INCLUDEPATH += $$PWD/DataModels/HTTPReply
      

      in *.h:

      #include <shttpreplyuserlogin.h>
      

      Everything works fine. Just this warning. Is it Qt bug?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @bogong
      No it's not a Qt bug. (The message isn't even generated by Qt, it's generated by your compiler.)

      If you read the message it tells you why the path is non-portable, doesn't it?

      specified path differs in case from file name on disk [-Wnonportable-include-path]

      Will work under e.g. Windows, will not work under e.g. Linux. Hence "nonportable".

      And it tells you what to do about it: either switch off the -Wnonportable-include-path warning, or (better) change your include statement or the case of the file/path name on disk to match each other.

      1 Reply Last reply
      3

      • Login

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