Rafael Rodr�guez Velilla wrote:
>
> > FWIW, looks like you're missing "#include <linux/i2c-dev.h>" or not using
> > correct version of same?
> >
> > Have you reviewed "Documentation/i2c/dev-interface" and others?
> >
> > You probably need something like:
> >
> > arm-linux-gcc ... -I{path_to_assabet_kernel_sources}/include ...
>
> I don't think that the problem is in the include file. The error happens
> at link time, not at compile time.
It happens at link time because the compiler _assumed_ that the missing functions
were externals. However, they're defined as "inline" functions in i2c-dev.h.
> The program I was trying to compile was made following the indications in
> Documentation/i2c/dev-interface.
> The program compiles correctly for my PC (and I don't have i2c support
> compiled in it).
Hmm, funny, building native I2c user programs on my dev host fails the
same way. Ahh, it looks like yor compilers maybe built for different
default optimization levels. This fails:
gcc -O0 i2cwrite.c
This works:
gcc -O{1|2} i2cwrite.c
At -O0, inline function definitions aren't actually expanded inline. They're
called as regular functions.
>
> Thank you fot your answer.
>
> _______________________________________________
> http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
> Please visit the above address for information on this list.
--
Regards,
George
_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.