Changelog:
programs/wcmd/wcmdmain.c: make 'cmd /c cl /MUMBLE foo.c' pass /MUMBLE to cl
LGPL.
-------
Here's how I use msvc's compiler from the Linux shell.
In ~/bin create the following three files:
--- cl ---
wine wcmd /c F:/bin/cl.bat "$@"
--- cl.bat ---
call F:/bin/vcvars32.bat
cl %1 %2 %3 %4 %5
--- vcvars32.bat ---
(same as one installed by msvc elsewhere, but with quotes
removed -- wcmd doesn't deal well with quotes. Hopefully
wcmd will be fixed soon, or is already fixed, to handle
quotes properly.)
Then you can just build demo programs under MSVC by saying
cl foo.c
in bash. This is handy for checking portability of wine
conformance tests.
Unfortunately, you can't pass options to cl, e.g.
cl /DSTANDALONE foo.c
without the attached patch.
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
Index: programs/wcmd/wcmdmain.c
===================================================================
RCS file: /home/wine/wine/programs/wcmd/wcmdmain.c,v
retrieving revision 1.22
diff -u -p -r1.22 wcmdmain.c
--- programs/wcmd/wcmdmain.c 11 Feb 2003 22:01:11 -0000 1.22
+++ programs/wcmd/wcmdmain.c 22 Feb 2003 19:37:48 -0000
@@ -56,14 +56,14 @@ HANDLE h;
args[0] = param[0] = '\0';
if (argc > 1) {
- for (i=1; i<argc; i++) {
- if (argv[i][0] == '/') {
+ /* interpreter options must come before the command to execute.
+ * Any options after the command are command options, not interpreter options.
+ */
+ for (i=1; i<argc && argv[i][0] == '/'; i++)
strcat (args, argv[i]);
- }
- else {
+ for (; i<argc; i++) {
strcat (param, argv[i]);
strcat (param, " ");
- }
}
}