This problem occurs if any design entities have the same name. In the Quartus II software verions 6.0 SP1 and earlier, this error could occur even if the entities with the same name are contained in different libraries. The Quartus® II software versions 6.0 SP1 and earlier require that all entities have unique names.
Beginning with the Quartus II software version 6.1, you can compile entities with the same name into different libraries.
For more information about libraries, refer to the Design Libraries section in the Quartus II Integrated Synthesis (PDF) chapter in volume 1 of the Quartus II Handbook.