Tripping up MS

djberg96 on 2004-06-26T06:29:13

As posted by Nobu Nakada:

cl.exe apparently doesn't pass arguments with spaces to link.exe correctly. $ cat a.c int main(int argc, char **argv) { return 0; }

$ cat a.bat @cl.exe -Fea.exe a.c /link "/libpath:"c:\Program Files""

$ ./a.bat Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

a.c Microsoft (R) Incremental Linker Version 6.00.8447 Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:a.exe /libpath:c:\Program Files a.obj LINK : fatal error LNK1181: cannot open input file "Files.obj"
And I thought the Solaris linker was a pain. Good grief.