DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 56DCMNwC3186489 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 56DCMNwC3186489 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=SaUEGbQe X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23B06385840E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1752409342; bh=neGQyrmcD+yOBWKjKqpZX4ZGX3zifsVEe1Qun2kcFOc=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=SaUEGbQe6N1j/wrPTF6nIt/8s/QRZ92/tdoslHV49xLrKipOg4jE4NtPhddgs48L2 F40c85LdEOkHosvxRB9LmfM4WAifKEWDvN4dsMKflXx5Pr+GcvU9XP7WnoIBgsiEJk cZRwtJyzLvMrsRs71cH+auFdHMt/tAkWtUQw9p1Q= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4F3403858C42 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4F3403858C42 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752409299; cv=none; b=GCyqn35v5YqDWzPyldc07Az7suH9d8LJqh7hRjqziTrKzoqyLXYyji7ThQSb9fAupCiRxzPtKlB07QHUaRnxxCQ24KTYct9G2K8Chw3MYurb0zsdb3KhcmIoLH7kEL19rkZWQAVjKJnsm5XPiw8KHzc/5atDJJcIeB5GSZ1GaWQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752409299; c=relaxed/simple; bh=GHp1GwRYiogzpPS6yfRvzfT0dl6D1g0TDVIMP05OQ0U=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=k2cEzIJj/p8O1rtM24J9DOKD8WhLsOAHIJyA2+P0obzXDotFGbDhdGcoqtVZu9UMcWXtaSNrUElzeH3J4TWZnlw7tvTc/6rcT53foxoAuADmX22ei6B7IBUOzsg8EV2kHp/QRx1uaxNTOUsaq2S86rjflaOlpg3Er03gv8I873E= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F3403858C42 X-ASG-Debug-ID: 1752409298-24039d081814284c0001-w5GHUG X-Barracuda-Envelope-From: moss AT cs DOT umass DOT edu X-Barracuda-RBL-Trusted-Forwarder: 128.119.240.136 DKIM-Filter: OpenDKIM Filter v2.11.0 mailsrv.cs.umass.edu 029195E33F X-Barracuda-RBL-Trusted-Forwarder: 172.26.64.86 Message-ID: Date: Sun, 13 Jul 2025 08:21:35 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Any help with a gcc command line? Content-Language: en-US X-ASG-Orig-Subj: Re: Any help with a gcc command line? To: Fergus Daly , "'cygwin AT cygwin DOT com'" References: In-Reply-To: X-Barracuda-Connect: mailsrv.cs.umass.edu[128.119.240.136] X-Barracuda-Start-Time: 1752409298 X-Barracuda-Encrypted: TLS_AES_256_GCM_SHA384 X-Barracuda-URL: https://barramail.cs.umass.edu:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at cs.umass.edu X-Barracuda-Scan-Msg-Size: 1046 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.7 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.144226 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Eliot Moss via Cygwin Reply-To: Eliot Moss Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" On 7/13/2025 4:10 AM, Fergus Daly via Cygwin wrote: -lfoo is passed on to the linker (probably ld), which does a very simple adjustment of the name, specifically to libfoo.a. It searches for that name in in directories of the link path, which is what the -L option controls. (The .a is because of static linking; dynamic linking does a different name adjustment.) Some ideas: - You could specify a particular version you want, such as -lreadline-77.6 (made up numbers) if you have multiple version around distinguished in that way. - You can place a preferred version in /usr/local/lib and make sure that /usr/local/lib is searched before /lib, by using suitable -L options. Note that ld's man page says that -L specified directories are searched *before* the default directories. Thus: -L/usr/local/lib in this case. While you can do complicated things with gcc and ld, modest perusal of the ld man page might help you figure out -l and -L options that will most suit your goals. HTH -- Eliot Moss -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple