This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

lib_AT91SAM7S64.h: MULTIPLE PUBLIC DEFINITIONS

The example code for AT91SAM7S64 contains
#include <lib_AT91SAM7S64.h>
and it works fine.

When I include this in two or more .c
files, I get lots of linker errors like
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: AT91F_AIC_ConfigureIt?T

Now if there was a non-extern variable
declaration, or a normal routine in there
I'd understand it, but in lib_AT91SAM7S64.h,
AT91F_AIC_ConfigureIt is defined as __inline.

... and if it's inline, then why is the
compiler generating any public definitions
for it at all?
Why does the linker even need to see an
inline function?

I've tried changing "__inline" to "inline",
to agree more closely with the compiler
docs, but that didn't help.

Any ideas?

Parents
  • I hadn't, but I have now.
    According to the .i file for each of the
    .c files that includes lib_AT91SAM7S64.h,
    the function definition begins with
    __inline unsigned int AT91F_AIC_ConfigureIt (

    I don't think I've got NOEXTEND turned on,
    and I get no compiler errors in any case,
    just linker errors.

    I'd read up on the inline keyword, but there's
    a broken link in the online manual.

Reply
  • I hadn't, but I have now.
    According to the .i file for each of the
    .c files that includes lib_AT91SAM7S64.h,
    the function definition begins with
    __inline unsigned int AT91F_AIC_ConfigureIt (

    I don't think I've got NOEXTEND turned on,
    and I get no compiler errors in any case,
    just linker errors.

    I'd read up on the inline keyword, but there's
    a broken link in the online manual.

Children
No data