From: Christian G. <Chr...@gm...> - 2005-12-20 19:23:47
|
Hello! I have asked this question on the MSYS list before but I'm not sure whether that has been the right place. For some strange reason my MSYS shell does not pass on command line parameters to the program being called. To demonstrate that I have written a simple C program which does nothing but to merely output its command line arguments to stdout: // ---------------- snip --------------- #include <stdio.h> int main(int argc, char** argv) { int i; for (i = 0; i < argc; i++) printf("Command Line Argument %d: %s\n", i+1, argv[i]); return 0; } // ---------------- snap --------------- I have compiled that program once using the MingW and once using the Cygwin version of gcc. I have then run both executables in an MSYS shell and on the built-in Windows command line. When I run the MingW executable under an MSYS shell, the command line options are not passed on to the program: Gudrian@DEMETER /src/test $ /bin/cla one two three Command Line Argument 1: C:\msys\bin\cla.exe When I use Windows' CMD instead, everything works as expected. The Cygwin executable works in both environments. Any ideas what might cause this behaviour? Thanks, Christian |