From and after the time when the platting jurisdiction of the planning commission shall have attached by virtue of adoption by the planning commission of a major street plan and the adoption by the city council and the county commission of a set of land subdivision regulations recommended to them by the planning commission, no building permit shall be issued for and no building shall be erected on any lot within the municipality or county unless the street giving access to the lot upon which said building is proposed to be placed shall be accepted or opened as, or shall have otherwise received the legal status of a public street prior to that time, or unless such street corresponds in its location and lines with a street shown on a subdivision plat approved by said planning commission or on a street plat made and adopted by said planning commission or with a street located and accepted by the city council or county commission. Any building erected in violation of this section shall be deemed an unlawful structure, and the building inspector or attorney or other official designated by the city council or county commission may bring action to enjoin such erection or cause it to be vacated or removed.