You are eligible for compensation if the connecting flights are under one booking. All the EU 261 requirements apply here as well.