A template fails to register with "A section called GlobalInit has already been defined"

Applies to: the ABC template chain; a small template that registered in Clarion 9 but not in the Clarion 10 group's install. The thread does not name a build number.

Problem

A short .tpl with #TEMPLATE(RABProcInit,...),FAMILY('ABC') and #INCLUDE('RABProcInit.tpw') was placed in the Accessories\Templates\Win folder. The poster had it running in Clarion 9 but registering it in Clarion 10 gave errors. The .tpw held two #EXTENSION lines, one for an init routine call and one for a kill call, both written as #EXTENSION(GlobalInit,...),APPLICATION.

Solution

  1. Read the registration error text. A poster who tried the template reported: Error: A section called GlobalInit has already been defined, followed by Error: Expected a section header at the second #EXTENSION line.
  2. Give each #EXTENSION its own name. Two extensions with the same name in one template are a duplicate declaration, and the second one is not read as a section header.
  3. Register the template again from the Template Registry.

Caveats

  • The original poster wrote that the same file had registered, compiled and run in Clarion 9.1. The poster who tested it reported the double-declaration error, so the thread does not explain why Clarion 9.1 accepted it.
  • The poster never reported back after the rename, so the fix is the one suggested and not a confirmed result.
  • A second reply only asked what the errors were; the error text above came from the poster who tried the files.

Today (2026)

Likely unchanged: a duplicate section name is a plain declaration error. Not re-tested on a current build.

Sources: Rich B. (Jun 2015, the question), a poster (Jun 2015), Graham D. (Jun 2015, the error text), Lee W. (Jun 2015) in sv.clarion.clarion10.