The Codes Enforcement Officer shall in no case grant any building permit for any building or structure which does not comply with the provisions of this chapter, and where approval of the Planning Board or the Board of Appeals is required, only upon written order of such Board.