Non-portable path to file warning. Why?
Unsolved
General and Desktop
-
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?
-
@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.