From: Tom Kacvinsky <tkacvins@gmail.com>
To: 桂永林 <guiyonglin@huaqin.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>, 柳茂昕 <liumaoxin@huaqin.com>,
李闯闯 <lichuangchuang@huaqin.com>
Subject: Re: GCC link error help!
Date: Mon, 11 Oct 2021 01:10:54 -0400 [thread overview]
Message-ID: <CAG_eJLdWiGtKpzRWmPKEmKP75Hes1esQtWX6epuy3Wah0Sm4VA@mail.gmail.com> (raw)
In-Reply-To: <20f6fd91.5593e.17c6d6050ed.Coremail.guiyonglin@huaqin.com>
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 桂永林 <guiyonglin@huaqin.com> 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-eabi/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 that
> 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 used
> 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
next prev parent reply other threads:[~2021-10-11 5:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 3:23 桂永林
2021-10-11 5:10 ` Tom Kacvinsky [this message]
2021-10-11 6:43 ` LIU Hao
2021-10-11 7:57 ` 桂永林
2021-10-20 14:53 ` GCC link problem help! 桂永林
2021-10-20 16:17 ` Xi Ruoyao
2021-10-21 3:36 ` 桂永林
2021-10-21 12:04 ` Xi Ruoyao
2021-10-21 12:34 ` Jonathan Wakely
2021-10-22 3:37 ` 桂永林
[not found] ` <617231DF.3080808@huaqin.com>
2021-10-22 3:39 ` 桂永林
2021-10-22 7:06 ` Jonathan Wakely
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=CAG_eJLdWiGtKpzRWmPKEmKP75Hes1esQtWX6epuy3Wah0Sm4VA@mail.gmail.com \
--to=tkacvins@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=guiyonglin@huaqin.com \
--cc=lichuangchuang@huaqin.com \
--cc=liumaoxin@huaqin.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).