Error compiling arduino editor but not IDE

AFAIK the IDE transforms .ino files into .cpp files, includes main() etc.
Search for such files in your folders after compiling in the IDE.