Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.11.2
-
None
-
Windows 10
Description
When trying to copy the file `libstdc++6.dll` with `qmake` from one directory to another in my .pro file, it worked when called inside qt creator (installed and executed from msys2/mingw64), but later when I was running it in our build server or from the command prompt using `qmake; make` from a Windows batch file, it consistently failed.
Apparently the built-in `copy` in `cmd` has support for concatenating two or more files into a destination file if you use the plus sign operator `+`, and it doesn't need to be padded by spaces. To get around this you have to wrap the filename in quotes to ignore this functionality. But qmake and the `${COPY}` command don't let the file keep its quotes if there are no spaces in the file name.
So in summary, if a file to be copied in Windows has plus sign in it, it needs to be wrapped in quotes to protect it from the oddball concatenation feature of `copy` in cmd in Windows.
Attachments
Issue Links
- duplicates
-
QTBUG-16372 Qmake INSTALLS doesn't copy certain files on windows (files with special characters in name)
- Closed
- is duplicated by
-
QTBUG-84023 QMAKE_COPY fails on Windows for paths containing '+' (plus)
- Reported