From: Pierre J. <pie...@gm...> - 2008-06-18 21:55:34
|
I'm directly working off code i got from posts in here. My issue is that when i bitbake i get ERROR: function do_compile failed In function `main': | control.c:(.text+0x20): undefined reference to `I2cSetSlaveAddress' | control.c:(.text+0x30): undefined reference to `I2C_IO_GetGPIO' | collect2: ld returned 1 exit status but here are the includes and the main in my control.c: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <termios.h> #include <fcntl.h> #include "i2c-io-api.h" #include "i2c-api.h" // this is where the trouble file is located #include "i2c-io.h"//added by Pierre #include "i2c.h"// added by Pierre #include "i2c-dev.h" #include <getopt.h> #include <errno.h> #include <signal.h> #include <unistd.h> #include <sys/timeb.h> #include "AvrInfo.h" #include "BootLoader-api.h" #include "Log.h" int main( void ) { int i2cDev; uint8_t pinVal; i2cDev = open( "/dev/i2c-0", O_RDWR ); I2cSetSlaveAddress( i2cDev, 0x0b, I2C_USE_CRC ); if ( I2C_IO_GetGPIO( i2cDev, 1, &pinVal )) { printf( "Read %d\n", pinVal ); } else { printf( "Error calling I2C_IO_GetGPIO\n" ); } printf("Something works\n"); printf("Something still works\n"); return 0; } Any idea of what is going wrong? Thanks! -P -- View this message in context: http://www.nabble.com/compile-error%2C-says-function-is-undeclared-when-baking..-tp17992810p17992810.html Sent from the Gumstix mailing list archive at Nabble.com. |