I too 'randomly' get this error message.
Senario. projects contain 1 main source file and numerous includes.
Linking fails as shown below.
This has now happened to me on two projects. Once it started, the 'project' remains unbuildable, until....
The project that broke for me yesterday works today - but a new project is broken today.
Simply renaming the .c file and recompiling/relinking using the new (base)name, works.
-- Fredric, thanks very much for the "moving the code did work" tip.
Another tip: Inserting a blank line at the top of the source file may help.