How to compile multiple C++ file - Really new to platform IDE and coding

I am working on a project where I have assigned to just compile the program which has multiple .h and .cpp files. I read that PlatformIO is one of the best IDE for building app for ESP32.
The main.cpp file in my project is a .ino file. I tired different method to compile the files and build app.

 include
      - .h files
   src
     - all .cpp files
  • Should I rename the .ino file to .cpp file?
  • I just need a small guidance where to begin and I can work from there to try to compile and build the application

PS - I was able to compile the files in Arduino IDE and flash it to the chip

Yes. You can also use the concepts of PlatformIO libraries. if pieces of code are supposed to be reusable across projects.

Yes and convert it.

E.g.,

1 Like