Struct MPU6050 violates one definition rules [-word]

I tried using the "I2Cdev" and "MPU6050_6Axis_MotionApps20.h" libraries to get measurements from MPU6050 accelerometer in arduino UNO and the Arduino editor returned me the following warning:


sketch\MPU6050.h:436:7: warning: type 'struct MPU6050' violates one definition rule [-Wodr]

class MPU6050 {


sketch\MPU6050.h:436:7: note: a different type is defined in another translation unit

class MPU6050 {


sketch\MPU6050.h:1026:18: note: the first difference of corresponding definitions is field 'dmpPacketBuffer'

uint8_t *dmpPacketBuffer;


sketch\MPU6050.h:436:7: note: a type with different number of fields is defined in another translation unit

class MPU6050 {



The program compiles and it generates the interrupt signal but it does not send me the data correctly (the return messages have no meaning, it's like ASCII characters)

I think there is a parameter declared two time in the library. But I can't find exactly what is the problem

If some one did before, thank you for advice

Try posting your complete sketch with links to the libraries you are using.

Thank for the information, here is my sketch :

It's just a small program for the moment because I figure out that the problem is in the libraries :

#include "I2Cdev.h"

#include "MPU6050_6Axis_MotionApps20.h"

    #include "Wire.h"

void setup(){

void loop(){

I explain what it happen :

The library "MPU6050_6Axis_MotionApps20.h" includes another library which is "MPU6050.h" and there is a " violation one definition rules" warning when I simulate the little arduino code and I get the error I give in the last post.

The Library files code are in this link :