Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Non-portable path to file warning. Why?
bogong last edited by bogong
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
Everything works fine. Just this warning. Is it Qt bug?
JonB last edited by JonB
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-pathwarning, or (better) change your include statement or the case of the file/path name on disk to match each other.