ESP32-Cam Camera Web Server compiler error

I notice there was a change to the script in the 2.0.0 release of ESP32 boards platform:
https://github.com/espressif/arduino-https://github.com/espressif/arduino-esp32/commit/a618fc1361b08aa968407dd81b7b065cca207f46#diff-f04d57c30bf198330d097ecd0999d61fe613442da9dcf94f5395b071e8f5238b

Do you still get the error after you use the Arduino IDE's Boards Manager (Tools > Board > Boards Manager) to update to 2.0.0? Even if there is a reason you are using 1.0.6, it's worth doing just as an experiment. You can always install 1.0.6 again after.