Error compiling with mpu6050 (undefined reference)

Hello I am an extreme beginner
I am using nodemcu 1.0 (ESP 12E moule)
ARDUINO-1.8.5

flash size - 4M (3M SPIFFS)
Debug port -Serial
Debug Level - None
IwIP Varriant - v2 lower memorry
CPU Frequency - 80Mhz
Speed Level- 115200
erase flash- sketch only

THIS IS THE CODE THAT I AM TRYING TO COMPILE
undefined reference to `MPU6050

full error message is attached with the message

whenever I compile the file i get the following error messages which I have copied in the attached file

PLEASE CAN ANYONE HELP ME WITH IT, I AM STUCK HERE SINCE 1 WEEK

THANKS IN ADVANCE

error message.txt (14.5 KB)

code.txt (12.5 KB)

Uncomment the MPU6050.h include. The include may not be necessary from a C compiler standpoint but the IDE magic to get the necessary libraries for the linker may need it.

Thank you very much for your help but I am getting the same message.
even if I try to compile MPU6050 DMP6 I get the same error

How did you install the MPU6050 library? Did you use the library manager of the IDE?

I had installed a library named - mpu6050 from library manager and also added mpu6050.h file in the folder containing the ino file

Remove that mpu6050.h file in the same folder as the .ino file. If it’s there the IDE expects the corresponding library code to be in the same folder.

Thanks for your answer sir but it is still showing an error message its different than the previous one

ERROR MESSAGE-

Arduino: 1.8.5 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (3M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 9600"

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp: In member function 'float Quaternion::getMagnitude()':

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:74:46: error: 'sqrt' was not declared in this scope

             return sqrt(w*w + x*x + y*y + z*z);

                                              ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp: At global scope:

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:94:9: error: 'int16_t' does not name a type

         int16_t x;

         ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:95:9: error: 'int16_t' does not name a type

         int16_t y;

         ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:96:9: error: 'int16_t' does not name a type

         int16_t z;

         ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:104:29: error: expected ')' before 'nx'

         VectorInt16(int16_t nx, int16_t ny, int16_t nz) {

                             ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp: In constructor 'VectorInt16::VectorInt16()':

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:99:13: error: 'x' was not declared in this scope

             x = 0;

             ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:100:13: error: 'y' was not declared in this scope

             y = 0;

             ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:101:13: error: 'z' was not declared in this scope

             z = 0;

             ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp: In member function 'float VectorInt16::getMagnitude()':

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:111:25: error: 'x' was not declared in this scope

             return sqrt(x*x + y*y + z*z);

                         ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:111:31: error: 'y' was not declared in this scope

             return sqrt(x*x + y*y + z*z);

                               ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:111:37: error: 'z' was not declared in this scope

             return sqrt(x*x + y*y + z*z);

                                     ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:111:40: error: 'sqrt' was not declared in this scope

             return sqrt(x*x + y*y + z*z);

                                        ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp: In member function 'void VectorInt16::normalize()':

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:116:13: error: 'x' was not declared in this scope

             x /= m;

             ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:117:13: error: 'y' was not declared in this scope

             y /= m;

             ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:118:13: error: 'z' was not declared in this scope

             z /= m;

             ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp: In member function 'VectorInt16 VectorInt16::getNormalized()':

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:122:27: error: 'x' was not declared in this scope

             VectorInt16 r(x, y, z);

                           ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:122:30: error: 'y' was not declared in this scope

             VectorInt16 r(x, y, z);

                              ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:122:33: error: 'z' was not declared in this scope

             VectorInt16 r(x, y, z);

                                 ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp: In member function 'void VectorInt16::rotate(Quaternion*)':

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:138:29: error: 'x' was not declared in this scope

             Quaternion p(0, x, y, z);

                             ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:138:32: error: 'y' was not declared in this scope

             Quaternion p(0, x, y, z);

                                ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:138:35: error: 'z' was not declared in this scope

             Quaternion p(0, x, y, z);

                                   ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp: In member function 'VectorInt16 VectorInt16::getRotated(Quaternion*)':

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:153:27: error: 'x' was not declared in this scope

             VectorInt16 r(x, y, z);

                           ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:153:30: error: 'y' was not declared in this scope

             VectorInt16 r(x, y, z);

                              ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:153:33: error: 'z' was not declared in this scope

             VectorInt16 r(x, y, z);

                                 ^

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp: In member function 'float VectorFloat::getMagnitude()':

C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050\helper_3dmath.h.cpp:178:40: error: 'sqrt' was not declared in this scope

             return sqrt(x*x + y*y + z*z);

                                        ^

Multiple libraries were found for "Wire.h"
 Used: C:\Users\JOBIN JESSI\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\Wire
 Not used: C:\Users\JOBIN JESSI\Documents\Arduino\libraries\MPU6050
Multiple libraries were found for "EEPROM.h"
 Used: C:\Users\JOBIN JESSI\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\EEPROM
 Not used: C:\Users\JOBIN JESSI\Documents\Arduino\libraries\arduino-NVM
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
Invalid library found in C:\Users\JOBIN JESSI\Documents\Arduino\libraries\Arduino-PID-Library-master: C:\Users\JOBIN JESSI\Documents\Arduino\libraries\Arduino-PID-Library-master
Invalid library found in C:\Users\JOBIN JESSI\Documents\Arduino\libraries\Arduino-PID-Library-master: C:\Users\JOBIN JESSI\Documents\Arduino\libraries\Arduino-PID-Library-master

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Please can anyone help me out with this problem I am stuck here since a week

Have you tried to install a "math" library in your code ?
This might help to make the function "sqrt" work.

I tried what you said but there was still the error message
and I read the math.h file there was no mentioning of sqrt

THANKS FOR YOUR ADVICE BUT STILL HAVE AN ERROR MESSAGE.

My library manager doesn't offer an "MPU6050" library for installation, the only match I have is for MPU6050_tockn but that doesn't include a Wire.h file. It seems that you produced a mess in your library folder.