Based on comments, i decided to remove as much as i can until the error was gone and eventually the only thing in the cpp file was int main() { return 0:} and i still had the error!
So i deleted the project and created a new editor project, which actually works now.