From: cciarleg <cci...@um...> - 2012-06-18 16:32:00
|
Here is both the error and file it comes from. I have also tried using the gpio_init function straight in the main file with the same results. I tried to just copy gpio.c when using the functions for the first round. The error: Log data follows: | + do_compile | + arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/oeuser/overo-oe/tmp/sysroots/armv7a-angstrom-linux-gnueabi -fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb2 -Wl,-O1 -Wl,--hash-style=gnu -I ./lib -o eyeballfly -L ./lib src/Serial.cpp src/UDP.cpp src/WifiStart.cpp src/global.cpp src/Control.cpp src/Vehicle.cpp src/Execute.cpp src/main.cpp -lstdc++ -lpthread -lgpio | /tmp/ccS1aTNr.o: In function `Vehicle': | /home/oeuser/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/eyeballfly-1.0.0-r56/src/Vehicle.cpp:20: undefined reference to `gpio_init()' | /home/oeuser/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/eyeballfly-1.0.0-r56/src/Vehicle.cpp:20: undefined reference to `gpio_init()' | collect2: ld returned 1 exit status NOTE: package eyeballfly-1.0.0-r56: task do_compile: Failed ERROR: Function 'do_compile' failed (see /home/oeuser/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/eyeballfly-1.0.0-r56/temp/log.do_compile.28986 for further information) and the offending file: #include <stdio.h> #include <stdlib.h> #include "../include/Vehicle.h" #include "user-gpio.h" int Vehicle::initialized = 0; /********** Constructor **********/ Vehicle::Vehicle() { if(initialized != 1) { initialized = 1; printf("\nInitializing KAKE...\n"); } else printf("\nAlready initialized.\n\n"); //This is where we initialize things like serial ports etc (excluding the COMM to the ground station) //All other interfaces (GPIO,I2C,Serial,SPI,USB,CAMERA) go here if ( gpio_init() < 0 ) { perror( "gpio_init failed" ); exit( 1 ); } printf("KAKE initialized.\n\n"); return; } /********** Destructor **********/ Vehicle::~Vehicle() { printf("Done\n"); } Thanks. -- View this message in context: http://gumstix.8.n6.nabble.com/Using-and-building-the-user-gpio-source-tp4964614p4964659.html Sent from the Gumstix mailing list archive at Nabble.com. |