diff --git a/CMake/InstantiationTemplate.cxx.in b/CMake/InstantiationTemplate.cxx.in index 841c1aa1c..5988886f6 100644 --- a/CMake/InstantiationTemplate.cxx.in +++ b/CMake/InstantiationTemplate.cxx.in @@ -4,6 +4,9 @@ #include <@INSTANTIATION_TEMPLATE_SOURCE@> +/* Needed for linking errors when no instantiations */ +int @INSTANTIATION_INC_GUARD@@counter@__; + @INSTANTIATION_DECLARATION@ #undef @INSTANTIATION_INC_GUARD@