This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: undefined reference to xxx
- From: Ian Lance Taylor <iant at google dot com>
- To: horseriver <horserivers at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 9 Jan 2013 08:25:17 -0800
- Subject: Re: undefined reference to xxx
- References: <20130108232233.GB16123@debian.localdomain>
On Tue, Jan 8, 2013 at 3:22 PM, horseriver <horserivers@gmail.com> wrote:
>
> during my compilation , I find a odd problem ,
>
> in a .c file , there is no use of a function strcpy , but when link ,
>
> ld report error : ec.c:(.text+0x1ade7): undefined reference to `strcpy'
>
> hot can I resolve this ?
Either 1) provide a definition of strcpy or 2) use the -fno-hosted option.
Ian