Error : undefined reference

Hi, there.
I’m trying to use the Navio+ on RaspberryPi first time.
When i compile the example file, I see the error message as follows.
Please help me, if you know to solve this problem.

thanks.


root@Peter:/home/pi/navio/AccelGyroMag# gcc -o AccelGyroMag AccelGyroMag.cpp -lwiringPi
/tmp/ccGgozwr.o: In function main':** **AccelGyroMag.cpp:(.text+0x14): undefined reference toMPU9250::MPU9250()'
AccelGyroMag.cpp:(.text+0x28): undefined reference to MPU9250::initialize(int, int)'** **AccelGyroMag.cpp:(.text+0x6c): undefined reference toMPU9250::getMotion9(float, float, float*, float*, float*, float*, float*, float*, float*)’**
collect2: ld returned 1 exit status


Hello Jeremy

That’s because we use our own drivers, no need for WiringPi lib. In each Example directory there is a makefile. To compile just type make. Then run with sudo ./AccelGyroMag.

Please, refer to the docs

I got it. Thank you for helping me.