You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like link.exe does not like /d/ while the C preprocessor has no issues with that. Possibly paths starting with / could be adjusted; it should be quite save to changed /X/ to X:/ when X is a single letter.
The text was updated successfully, but these errors were encountered:
GitMensch
added a commit
to GitMensch/cccl
that referenced
this issue
Oct 8, 2021
it should be quite save to changed /X/ to X:/ when X is a single letter.
Not safe and too hacky IMHO. This approach makes too many presumptions about the file system emulation in the Unix space. cccl is not the right tool to manipulate file names and so won't accept patches to manipulate them.
The correct way is to use the appropriate file manipulation tools (cygpath on mingw/msys/cygwin) or inbuilt path translations in MinGW/MSYS, see https://web.archive.org/web/20201112005258/http://www.mingw.org/wiki/Posix_path_conversion (Wayback machine snapshot of mingw.org is the best I could find). Assuming you are using a mingw based system, I think this is also a bug there as it should adjust file paths when invoking a win32 executable. Or perhaps you have set MSYS_NO_PATHCONV by mistake?
Lastly, the example you gave works for me using MSYS2 and cl.exe finds the library to link with when using a -L with a full path as you've shown using slashes. It would be interesting to see the translated paths that MinGW/MSYS actually pass to cl.exe. Try use one of the sysinternal tools??
link error with
cccl -o conftest.exe -I/d/dev/includes -L/d/dev/libs mconftest.c -lmpir --cccl-verbose
works with
cccl -o conftest.exe -I/d/dev/includes -Ld:/dev/libs mconftest.c -lmpir --cccl-verbose
It looks like link.exe does not like
/d/
while the C preprocessor has no issues with that. Possibly paths starting with / could be adjusted; it should be quite save to changed /X/ to X:/ when X is a single letter.The text was updated successfully, but these errors were encountered: