public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Thomas Wolff <towo@towo.net>
To: cygwin@cygwin.com
Subject: Re: GCC doesn't find relative includes when passed paths using backward-slashes
Date: Sun, 15 Jan 2023 15:21:39 +0100	[thread overview]
Message-ID: <573d1c7c-5b09-766e-3203-7fac7104376c@towo.net> (raw)
In-Reply-To: <b794f3d3-d197-80a2-c16a-00d1d61dd097@t-online.de>



Am 15.01.2023 um 14:51 schrieb Hans-Bernhard Bröker via Cygwin:
> Am 15.01.2023 um 13:38 schrieb Alexander Grund via Cygwin:
>
>> The build system, finding it is running on Windows, will pass paths 
>> with backward slashes to the compiler. 
>
> And that's wrong.  Cygwin is not, for practical intents and purposes, 
> Windows.  It just runs on top of it.
>
> Yes, backslashed path names do work in some cases on Cygwin (note that 
> in the case at hand, you did have to "" around the name for that to 
> work).  But at some point that idea has to be given up to achieve the 
> primary goal of emulating a Unix-like environment.
>
> The correct solution thus becomes "Don't do that, then."  Fix the 
> build system detection to recognize Cygwin as a type of Unix, and 
> things will almost certainly just work.
>
>
It also depends on how your application, in this case gcc or rather cpp, 
handles path names.
If it uses library functions dirname and basename, it should work as you 
expect, but maybe it looks for '/' itself, so you cannot expect all 
applications to be patched for cygwin/Windows pathname support.

  reply	other threads:[~2023-01-15 14:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15 12:38 Alexander Grund
2023-01-15 13:51 ` Hans-Bernhard Bröker
2023-01-15 14:21   ` Thomas Wolff [this message]
2023-01-15 16:23 ` Achim Gratz
2023-01-16 23:42 ` Dan Harkless

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=573d1c7c-5b09-766e-3203-7fac7104376c@towo.net \
    --to=towo@towo.net \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).