From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 7C6673858D35 for ; Mon, 11 Oct 2021 05:11:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7C6673858D35 Received: by mail-ed1-x52b.google.com with SMTP id g10so62080696edj.1 for ; Sun, 10 Oct 2021 22:11:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=loS4N/NkUKHFVggPLkEPFXJxPgDyKzbYEKB4zij2CU4=; b=R51kxEqd/V6Y24ILr/EAnkDN36p9wZaWrqoDF7vjl3VjaBVzRNBcM3hIBcq3+ARAHB cQuimgAhI5a83AyAbPCzx0qLIcRrgyHdkfQzSA6yV/PmHgyJzvNIjo8uiIAnAoxJGHRA NCH6wpYeiFuHlADYfT6LHOjltxAwkPEmYhC1MULvpKPbgmnOfwG4mE3UDVqp4nE5OJcd TcOUVHTX3aYRemXYtZKzaMDZsOPtQjKiw7XhnAc43MUo3hYZZfT6SUG0EFp5vKA5mxSA cA4zTHneZtcHUBhYt7pxDQg77QdHwYyQAlj6GggVA3Oha2qHcFglv71gRughBuqjSrq7 hXEw== X-Gm-Message-State: AOAM532nBHYXicZB7iqSP/C0ihjZ0SIE6diEg1zI0ZCzLje4fBpr4IfT uk8kkVbIdyvPNE9GoPbzzed2BI5ovaOs5ijFzTA= X-Google-Smtp-Source: ABdhPJzMxFzukLdEs3cZTrGiqijMSd3xkGQ6RNOLmEjVlMTMp9WCPMOdGKXRkbHefO2rmDRmz3JmNbilRnYibjDC0AU= X-Received: by 2002:a50:cf4c:: with SMTP id d12mr38652920edk.115.1633929065132; Sun, 10 Oct 2021 22:11:05 -0700 (PDT) MIME-Version: 1.0 References: <20f6fd91.5593e.17c6d6050ed.Coremail.guiyonglin@huaqin.com> In-Reply-To: <20f6fd91.5593e.17c6d6050ed.Coremail.guiyonglin@huaqin.com> From: Tom Kacvinsky Date: Mon, 11 Oct 2021 01:10:54 -0400 Message-ID: Subject: Re: GCC link error help! To: =?UTF-8?B?5qGC5rC45p6X?= Cc: gcc-help , =?UTF-8?B?5p+z6IyC5piV?= , =?UTF-8?B?5p2O6Zev6Zev?= X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2021 05:11:09 -0000 Meant to reply all, but remove the gcc list as this is really a gcc-help list question. My answer is below. On Sun, Oct 10, 2021 at 11:23 PM =E6=A1=82=E6=B0=B8=E6=9E=97 wrote: > Hello GCC, > we use gcc compiler to complile my project on windows10 system, but it > always report bellow error: > > > c:/program files (x86)/gnu tools arm embedded/7 > 2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-ea= bi/bin/ld.exe: > cannot find -lgh3x2x_drv_co > collect2.exe: error: ld returned 1 exit status > make: *** [makefile:151: wd6110a.elf] Error 1 > > > > It seems that the link can not fond some lib, but the real reason is tha= t > the project path and source code file on windows environment is too long. > But,if we use the same GCC version to compile my project on Linux > enviroment, it can compile sucess. The GCC compiler and source code we us= ed > on Linux is same with Windos. > We don't know how the GCC restict the path lenth and source code file > number on Windows, so we need your help us how to fix this problem? > Thanks! > OperaGui > > >From the GCC man page, you can use the @file option to gcc. This can be a file that contains your include and link directory paths, etc.... This way, you will not exceed the argument list size limit. @file Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed. Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively. Tom