This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

error: must link using compiler shell to complete template instantiations

Guru 10750 points

Hi,

From time to time I'm getting the error: must link using compiler shell to complete template instantiations, using clean help solving the issue (recompile everything...) but why do we get this error? (I'm using CGT 7.0.3, this issue occurs with previous versions of CGT)

BR,

HR

  • I think this might have to do with the late template instantiation model used by the tools which has dependencies on flags left in the .obj files.

    Looks like cleaning the project and rebuilding gets around it by re-creating the .obj files. The option --static_template_instantiation might also help as in this case the parser instantiates all templates statically. Ofcourse this will take up more code space, but the linker does not need to recompile everything. 

  • Aarti,

    Yes, this is connected to late template instantiation, and yes, we are compiling everything from time to time...:-(

    Many Thanks,

    HR

  • HR said:

    [..] must link using compiler shell to complete template instantiations, [..] but why do we get this error? [..]

    By default, the compiler uses late template instantiation.  This mode creates a temporary file to keep track of which templates need to be instantiated.  This error means that the compiler could not find this file, for whatever reason.  I cannot further guess why the file can't be found without a reproducible test case.