The first step which helps in many of these compilation issues: Go to "Tools" > "Configure Build Lazarus" > in the "Clean up" box check "Clean all" and "Switch after building to automatically" > click "Build". This results in a clean build. When the IDE restarts after a while the issue probably will be fixed. (If there is an error delete the lazarus.exe and rename "lazarus.old.exe" to "lazarus.exe" (on Windows) to at least get a working IDE again.)