CreateProcess() - executed program gets different argument depending if it's compiled with gcc (cygwin) or cl (VS)?

Corinna Vinschen
Thu Feb 18 20:42:00 GMT 2010

On Feb 18 21:24, Piotr Krukowiecki wrote:
> On Thu, Feb 18, 2010 at 7:02 PM, Larry Hall (Cygwin)
> <> wrote:
> > On 02/18/2010 12:55 PM, Piotr Krukowiecki wrote:
> >> - if the executed program is compiled with cygwin's gcc the program
> >> receives \\foo.cxx (just one backslash at the begining).
> >> - if it's compiled with cl it gets \\\foo.cxx (double
> >> backslash - what I expected)
> > '\' is an escape character in C, Unix, and Linux.  In Windows, it's a
> > path separator.  Use '/' instead when working with Cygwin and you'll
> > avoid allot of problems.  Better yet, use POSIX paths exclusively.
> "\\hostname" is remote path location, I don't think I can use
> "//hostname" instead, either for cygwin program and especially not for
> not-cygwin program, can I? (can't check it now)

Yes, you can use forward slashes, even in Win32 calls.  In Cygwin you
*should* use them, otherwise you lose certain functionality.  The next
version of the Cygwin User's Guide, which will come with Cygwin 1.7.2,
adds additional description about this.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list