mudassar-tamboli / ESP32-OV7670-WebSocket-Camera

Demonstrates Video Streaming from ESP32+OV7670 hardware using WebSocket protocol
Apache License 2.0
79 stars 22 forks source link

'malloc' was not declared in this scope #12

Open Syahrul012 opened 2 years ago

Syahrul012 commented 2 years ago

I'm not very good when it comes to working with memories, but I found out malloc is not specified in Arduino, how do I come about making it work? If not what is the substitute for this.

 sketch\DMABuffer.h: In constructor 'DMABuffer::DMABuffer(int)':

 DMABuffer.h:10:43: error: 'malloc' was not declared in this scope

      buffer = (unsigned char *)malloc(bytes);

                                       ^
Timebeast commented 1 year ago

I was just facing the same issue.

Solution is to add "#include " at the first line of "DMABuffer.h" file.