Please,
If I create a new sketch which uses files from an older
I get "multiple definition" Errors because objects from a sketch before are included when linking.
I tried to delete them in TEMP folder, but this objects are restored again.
How to start with a clean sketch?
Thank you for advice
Erhy with Arduino IDE 2.0 rc9.1
Here my turn with Arduino 1.8.19. It results also with IDE 2.0 rc9.1
File New
save as
SubCamRobotV04
compiled error free
content changed with code from previous example
compiled with errors, because missed include file
new Tab parsebytes.h for missed include file
content changed with code from previous example
new Tab myconfig.h for missed include file
content changed with code from previous example
purged CameraWebServer in H:\Users\gle\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\libraries\ESP32\examples\Camera
compiled again with error because undefined references
but there are objects listed from older project here:
C:\Users\gle\AppData\Local\Temp\arduino_build_107559\libraries\esp32-cam-webserver-master
and I got the failure:
C:\Users\gle\AppData\Local\Temp\arduino_build_723552\libraries\esp32-cam-webserver-master\app_httpd.cpp.o: in function startCameraServer(int, int)': H:\Users\gle\Documents\Arduino\libraries\esp32-cam-webserver-master/app_httpd.cpp:746: **multiple definition** of startCameraServer(int, int)';
C:\Users\gle\AppData\Local\Temp\arduino_build_723552\sketch\app_httpdV0.cpp.o:H:\Users\gle\Documents\Arduino\SubCamRobotV04/app_httpdV0.cpp:992: first defined here
the folder arduino_build_723552 disappears if I quit the Arduino IDE
Select Sketch > Show Sketch Folder from the Arduino IDE menus.
Put the entire sketch folder in a ZIP file.
Open a forum reply here by clicking the Reply button.
Click the "Upload" icon () on the post composer toolbar:
Select the .zip file you created.
Click the Open button.
Click the Reply button to publish the post.
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the ZIP file onto the post composer field to attach it.
This is currently Arduino IDE 2.x's very cryptic way of telling you that you forgot to select a board from either the Tools > Board menu or the dropdown board selector menu on the toolbar.
The bug is being tracked by the developers here:
If you have a GitHub account, you can subscribe to that issue to get notifications of any new developments related to this subject.
There is also an issue tracking the fact that even the less cryptic intended error message from before the introduction of the arduino/arduino-cli#1812 bug is still not very clear:
The Arduino build system compiles all the .cpp files that are contained in the sketch source folder.
The Arduino IDE build system compiles all the .cpp files that are contained in the libraries discovered via the #include directives in your sketch, and in those libraries, and so on...
If there is a definition of a function in a source file of a sketch, and another definition of a function of the same signature in a source file of a library compiled by the build system, you get this multiple definition error message.
I don't know why you added this app_httpdV0.cpp file to your sketch. so I can't provide specific instructions for fixing the error, but I can list some potential approaches:
If app_httpdV0.cpp has not purpose, simply delete it from the sketch folder.
If the compilation of the "esp32-cam-webserver" library was unintended, investigate why it was discovered. Enabling verbose output during compilation in File > Preferences and then studying the text in the Output panel of the IDE after compiling the sketch will help with this
If both functions are wanted, adjust the code to prevent the name collision
Thank you so much!
My failure was to import the library esp32-cam-webserver-master with .zip from GitHub
and duplicated the code in the sketch
I fixed it by purging the folder CameraWebServer in the directory libraries, a sub folder of the standard Arduino directory.