Compiler Error

We have had some problems with the compiler, which kept informing:
“- section_entry_scn type is non-overlay or absolute but occurs in more than one input file”.

To clearify, we have written one source file named “UserCommand”, with the appropriate header, to handle, of course, the users’ commands.

What have we done wrong?
Thanks in advanced, Team #1943.

That means you’ve inadvertently used the same .c file in your project twice.

Make sure you haven’t accidentally “included” ANY .c files, e.g., “include ifi_startup.c” is incorrect. Only .h files are ever included.

The other possibility is that you’ve copied your code to another directory. Until you do a “Clean” (or a “Build”), something in the MPLAB project information is still pointing to the original files, and it picks up some of the same data twice.

The easiest way to fix this requires a single keystroke. Instead of just pressing F10 to compile, use Control-F10 to do a full build of the project. That will clear up anything still hanging on from the previous directory. Once that’s done, F10 alone will be fine – until the next time you copy your code to another directory.