This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Why does #include <cyg/io/eth/eth_drv> define a bunch of time-related symbols?
- From: Grant Edwards <grant dot b dot edwards at gmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 25 Jun 2013 17:19:49 +0000 (UTC)
- Subject: Re: Why does #include <cyg/io/eth/eth_drv> define a bunch of time-related symbols?
- References: <kqchr4$1go$1 at ger dot gmane dot org>
On 2013-06-25, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> I'm working on a new Ethernet driver. eCos kernel/libs (including the
> new drive) build fine. But, when I try to link an application I get a
> bunch of errors because some time-related functions are defined twice.
> They're defined in libtarget where they're supposed to be, but they're
> also getting defined in the object file for my Ethernet driver [and I
> can't figure out why].
It's cause by compiling the driver with the -std=gnu99 flag. I a big
fan of limiting the scope of variables and like to use this sort of
construct:
for (int i=0; i<whatever; ++i)
{
// "i" is only visible inside this block
}
It appears that eCos header files don't work right when you compile
with C99 semantics...
--
Grant Edwards grant.b.edwards Yow! I just forgot my whole
at philosophy of life!!!
gmail.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss