From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout00.webspace-verkauf.com (mailout00.webspace-verkauf.com [37.218.254.21]) by sourceware.org (Postfix) with ESMTPS id 5C0B63858D32 for ; Sun, 15 Jan 2023 12:38:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C0B63858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=grundis.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=grundis.de Received: from c5.webspace-verkauf.de (c5.webspace-verkauf.de [37.218.254.105]) by mailout00.webspace-verkauf.com (Postfix) with ESMTPS id 66110401A0F for ; Sun, 15 Jan 2023 13:38:32 +0100 (CET) Received: from [192.168.178.22] (p4ffe15fe.dip0.t-ipconnect.de [79.254.21.254]) by c5.webspace-verkauf.de (Postfix) with ESMTPSA id 3CAB71B61B04 for ; Sun, 15 Jan 2023 13:38:32 +0100 (CET) Content-Type: multipart/alternative; boundary="------------q1drQzz0tcNxJqJr1rMIwptP" Message-ID: Date: Sun, 15 Jan 2023 13:38:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 To: cygwin@cygwin.com Content-Language: de-DE From: Alexander Grund Subject: GCC doesn't find relative includes when passed paths using backward-slashes X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,HTML_MESSAGE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --------------q1drQzz0tcNxJqJr1rMIwptP Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, consider the following MWE: |$ touch bar/foo.h $ cat bar/main.cpp #include "foo.h" int main(){} With this most simple setup calling GCC with `g++ "bar\main.cpp"` results in GCC failing to find the include file. However using `g++ "bar/main.cpp"` works as expected. | |So the compiler does find the CPP file and also is able to resolve others paths passed with backslashes (e.g. -I arguments) but basically disables resolving includes relative to the file including it. For context: This turned up on CI for Boost where "|C:\cygwin64\bin" is added to the PATH env variable to be able to use the Cygwin GCC with B2. The build system, finding it is running on Windows, will pass paths with backward slashes to the compiler. This happens on both CMD with the added PATH and using the bash. For reference I tried the same with MinGW and there either path separator worked. So it seems to be an issue in the Cygwin builds of GCC. I tried both 11.2 and 11.3, the latest currently available. Best Regards, Alexander Grund || --------------q1drQzz0tcNxJqJr1rMIwptP--