This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange Cygwin issue

On Mon, 19 May 2003, Igor Pechtchanski wrote:

> On Mon, 19 May 2003, David Abrahams wrote:
> > I thought you might be able to help with this.  I'm having a strange
> > problem invoking the "TLIB" tool (from Borland's free compiler package
> > from
> > Cygwin.
> >
> > When you pass paths to this thing, they need to have a particular
> > form.  TLIB seems to want to make everything into an option, so it
> > interprets forward slashes and dashes as beginning an option, no
> > matter where they appear... unless they're quoted.  Actually, It
> > always takes forward slashes as option characters, but dashes have to
> > be (double) quoted.  You can download this stuff and try for yourself
> > if curious.
> >
> > Anyway, if I have to pass a path like "c:\foo-bar\baz", it works from
> > the WinXP command-prompt, but not from the Cygwin command-prompt.  The
> > actual use case has the command being invoked by execvp, but the bash
> > shell seems to be a fine way to experiment with it.  the weird thing
> > is, I built a little windows app win MSVC to print out all of its
> > argv, and if I invoke it like this:
> >
> >       args "c:\foo-bar\baz"
> >
> > from either windows or cygwin, I see the same thing:
> >
> >      c:\foo-bar\baz
> >
> > I can't imagine what would make TLIB see something different, except
> > *perhaps* that it's a DOS program and not a Win32 program... not that
> > I have any idea how/why that has an effect.
> >
> > Can you shed any light on this?
> >
> > Many thanks in advance,
> > Dave
> Dave,
> Have you tried compiling a small DOS program with bcc and seeing what it
> would interpret its parameters as?  It might be helpful if it printed one
> argument per line, or somehow indicated where the break in the arguments
> happens.
> Also, IIRC from my DOS hacking days, assembly programs received the whole
> parameter string at once, and had to parse it themselves, so it's possible
> that you have found a bug in TLIB's argument parsing routine.
>         Igor


Actually, upon re-reading the above, it looks like it's a bash quoting
issue.  You might try the fix that worked for "cygstart": single quote the
double quotes, e.g.

tlib '"c:\foo-bar\baz"'

or, if you want to be more generic,

tlib '"'"`cygpath -w "$FILENAME"`"'"'

Make sure you copy the above *exactly* (better yet, cut/paste).
Hope this helps,
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]