From: Dave H. <dhy...@gm...> - 2010-07-14 18:33:10
|
Hi Emily, On Wed, Jul 14, 2010 at 10:04 AM, emmers369 <emm...@ya...> wrote: > > Hi, > I am having some trouble linking to my functions when I compile my files. > After reading some of the other posts it looks like maybe it's something I > am not including in LDFLAGS. Below I have included a snipped from the > program: main.c, sensors.c and sensors.h. When I bitbake them I get the > error that 'getGyroData()' is undefined despite the fact that it is in > there. I am also including my .bb file. I think that this line: ${CC} ${CFLAGS} ${LDFLAGS} -o ie2010 main.c is saying compile and link main.c to create the program ie2010. Presumably you need something like: ${CC} ${CFLAGS} ${LDFLAGS} -o ie2010 main.c sensors.c If you're creating a library, then you would need to use the -l (and possibly -L). I'm more familiar with using makefiles, so I made my gpio stuff use makefiles to create the libraries and apps, and have my bitbake recipie use make to build things. -- Dave Hylands Shuswap, BC, Canada http://www.DaveHylands.com/ |