niXman / mingw-builds-binaries

MinGW-W64 compiler binaries
GNU General Public License v3.0
2.56k stars 151 forks source link

g++ fails to build with UNC paths (paths start with \\) #72

Open srirams1987 opened 4 months ago

srirams1987 commented 4 months ago

13.2 fails build simple application where output in a path to a UNC directory

C:\work\x86_64-13.2.0-release-posix-seh-msvcrt-rt_v11-rev0\mingw64\bin>.\g++.exe c:\work\main.cpp -o \\UNC\path\example_files\main
C:/work/x86_64-13.2.0-release-posix-seh-msvcrt-rt_v11-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file \\UNC\path\example_files\main.exe: Invalid argument
collect2.exe: error: ld returned 1 exit status

12.1 builds the same application successfully

C:\work\x86_64-12.1.0-release-posix-seh-rt_v10-rev3\mingw64\bin>.\g++.exe c:\work\main.cpp -o \\UNC\path\example_files\main\main

Is this a bug with 13.2? The same can be observed with 12.2 also.

niXman commented 1 month ago

hmm... very strange... %)