$$PWD is not correct in a network-map driver
-
Hi ,guys:
here is my file structure in Windows10:MyProjectRootDirectory --MainExe ----MainExe.pro ----Project.pri --Config.pri --LibConfig.priin Config.pri ,it will include Project.pri like this:
include($$PWD/MainExe/Project.pri)it works in my local computer, named A.
when I works on another computer,named B, and map the project root directory to B's Driver as Z: , and recompile the MainExe.pro, it shows error:Cannot read Z:/MainExe/MainExe/Project.pri: No such file or directoryuse message($$PWD) it says:
Z:\MainExebut it should be:
Z:\when copy the project files to computer B's local driver ,like D:\, it works fine again.
So, why $$PWD is not correct shown in a network-map driver???
if we change it to a relative directory, some include path may not work neither, we prefer absolute path.
-
Hi ,guys:
here is my file structure in Windows10:MyProjectRootDirectory --MainExe ----MainExe.pro ----Project.pri --Config.pri --LibConfig.priin Config.pri ,it will include Project.pri like this:
include($$PWD/MainExe/Project.pri)it works in my local computer, named A.
when I works on another computer,named B, and map the project root directory to B's Driver as Z: , and recompile the MainExe.pro, it shows error:Cannot read Z:/MainExe/MainExe/Project.pri: No such file or directoryuse message($$PWD) it says:
Z:\MainExebut it should be:
Z:\when copy the project files to computer B's local driver ,like D:\, it works fine again.
So, why $$PWD is not correct shown in a network-map driver???
if we change it to a relative directory, some include path may not work neither, we prefer absolute path.
@QtTester said in $PWD is not correct in a network-map driver:
and map the project root directory to B's Driver as Z:
One possibility: under Windows each drive maintains its own current directory on that drive. I don't know whether this is used by the build process. Assuming you can build from a Command Prompt, prior to doing so if you go
Z: cd \ rem Or: cd /d Z:\and then build does this make any difference?
-
I wonder if _PRO_FILE_PWD_ would work any better for you.