Just an idea may help someone. I've seen many versions of the how to make a project Arduino IDE/C++ IDE compatible. This works for me and it's really simple.
In folder /myProject/
Complete contents of myProject.ino
#include myProject.h
In myProject.h
void setup();
void loop();
In myProject.cpp
void setup() {........}
void loop() {........}
Now it will build with Arduino IDE AND it will build with a C++ IDE and no need to waste time renaming files etc.
Works for me....