Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

failing when compiling .... #13

Open
ConradsenDK opened this issue Mar 7, 2023 · 1 comment
Open

failing when compiling .... #13

ConradsenDK opened this issue Mar 7, 2023 · 1 comment

Comments

@ConradsenDK
Copy link

C:\Users\jocon\OneDrive\Dokumenter\Arduino\useless-box\proximity-sensor.cpp: In member function 'uint8_t ProximitySensor::getProximity()':
C:\Users\jocon\OneDrive\Dokumenter\Arduino\useless-box\proximity-sensor.cpp:45:19: error: control reaches end of non-void function [-Werror=return-type]
45 | Serial.println(F("ProximitySensor: Reading proximity value FAILED!"));
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus.exe: some warnings being treated as errors
Multiple libraries were found for "Servo.h"
Used: C:\Users\jocon\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\Servo
Not used: C:\Users\jocon\AppData\Local\Arduino15\libraries\Servo
exit status 1

Compilation error: control reaches end of non-void function [-Werror=return-type]

not sure what to do? any one can help
i only need the programing.. then i can test

@priest6479
Copy link

I found the solution in this forum..
https://forum.arduino.cc/t/probleme-beim-kompilieren-in-der-arduino-ide/1094051/2

in proximity-sensor.cpp

Add a new line between lines 46 and 47. It should look something like this...

  }

return 0;
}

worked fine for me after that

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants