Jump to content
I2Cdevlib Forums
Sign in to follow this  
bojank

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

Recommended Posts

Hi there,
i have some errors using I2Cdev.h and MPU6050_6Axis_MotionApps20.h at compiling/check in Arduino IDE
Arduino IDE version: 1.89
I have no idea what causes those errors... Can someone help please?
Thank you in advance...

Errors:

1.
\Arduino\libraries\MPU6050/MPU6050.h:436:7: warning: type 'struct MPU6050' violates one definition rule [-Wodr]

 class MPU6050 {
2.
\Arduino\libraries\MPU6050\MPU6050.h:436:7: note: a different type is defined in another translation unit

 class MPU6050 {

3.
\Arduino\libraries\MPU6050/MPU6050.h:1036:18: note: the first difference of corresponding definitions is field 'dmpPacketBuffer'

         uint8_t *dmpPacketBuffer;

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

 class MPU6050 {

Share this post


Link to post
Share on other sites

I had a similar problem. I resolved it my adding the i2cdev and mpu6050 library folders to the MY DOCUMENTS/ARDUINO/LIBRARIES FOLDER.

For some reason they need to be there even if they exist in the library folder of ARDUINO residing in the Program Files Folder.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...